MSVC 2015 internal compiler error

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

MSVC 2015 internal compiler error

Gisle Vanem-3
While building OpenSSL from today's git-repo:

ssl\d1_srtp.c : fatal error C1001: An internalerror has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
 To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
 Help menu, or open the Technical Support help file for more information

INTERNAL COMPILER ERROR in 'f:\gv\VC_2015\bin\cl.exe'
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information

-----

Seems to be related to:
  typedef const char *OPENSSL_CSTRING;

in safestack.h Changing this into:

  #ifdef _MSC_VER
  typedef       char *OPENSSL_CSTRING;
  #else
  typedef const char *OPENSSL_CSTRING;
  #endif

helps, but triggers the same internal compiler error later on.

It suspect the compiler sees 'const const *x' in some
places. So I assume that's the trigger for this fault.

Details:
  Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86
  on Win-10 build 10240.

--
--gv

_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Michel
Hi,
FWIW I encountered the same problem last week with the statem_srvr.c.
I undestood that it was a compiler bug, but suspected there was an
underlying problem with the source code, as usually it is error in MY code
that make the compiler crashes...
:-(
So I gave a try to Visual Studio Community 2013 SP 5, and it compiles even
without a warning.
Contrary at what I read, the update 1 of VS 2015 didn't fixed this.


-----Message d'origine-----
De : openssl-dev [mailto:[hidden email]] De la part de
Gisle Vanem
Envoyé : samedi 16 janvier 2016 11:43
À : OpenSSL-dev
Objet : [openssl-dev] MSVC 2015 internal compiler error

While building OpenSSL from today's git-repo:

ssl\d1_srtp.c : fatal error C1001: An internalerror has occurred in the
compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)  To
work around this problem, try simplifying or changing the program near the
locations listed above.
Please choose the Technical Support command on the Visual C++  Help menu, or
open the Technical Support help file for more information

INTERNAL COMPILER ERROR in 'f:\gv\VC_2015\bin\cl.exe'
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information


_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Gisle Vanem-3
Michel wrote:

> FWIW I encountered the same problem last week with the statem_srvr.c.
> I undestood that it was a compiler bug, but suspected there was an
> underlying problem with the source code, as usually it is error in MY code
> that make the compiler crashes...

Nice to seem I'm not alone with such a problem.

> So I gave a try to Visual Studio Community 2013 SP 5, and it compiles even
> without a warning.
> Contrary at what I read, the update 1 of VS 2015 didn't fixed this.

I think I have this "update 1" from the cl version:
  Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86

And did you have problems with the x86 compiler too? Did you try the
x64 version also?

--
--gv
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Michel
> And did you have problems with the x86 compiler too? Did you try the x64
version also?

No, I didn't try the x64 version.

_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Jan Ehrhardt
In reply to this post by Gisle Vanem-3
Gisle Vanem in gmane.comp.encryption.openssl.devel (Sun, 17 Jan 2016
09:50:55 +0100):
>I think I have this "update 1" from the cl version:
>  Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86

There is a newer one:
   Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86

Did you install SP1 manually? It was not included in the normal Windows
Update. https://www.visualstudio.com/en-us/news/vs2015-update1-vs.aspx

Jan

_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Kurt Roeckx
In reply to this post by Gisle Vanem-3
On Sat, Jan 16, 2016 at 11:42:52AM +0100, Gisle Vanem wrote:

> While building OpenSSL from today's git-repo:
>
> ssl\d1_srtp.c : fatal error C1001: An internalerror has occurred in the compiler.
> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
>  To work around this problem, try simplifying or changing the program near the locations listed above.
> Please choose the Technical Support command on the Visual C++
>  Help menu, or open the Technical Support help file for more information
>
> INTERNAL COMPILER ERROR in 'f:\gv\VC_2015\bin\cl.exe'
>     Please choose the Technical Support command on the Visual C++
>     Help menu, or open the Technical Support help file for more information
>
> -----
>
> Seems to be related to:
>   typedef const char *OPENSSL_CSTRING;
>
> in safestack.h Changing this into:
>
>   #ifdef _MSC_VER
>   typedef       char *OPENSSL_CSTRING;
>   #else
>   typedef const char *OPENSSL_CSTRING;
>   #endif
>
> helps, but triggers the same internal compiler error later on.
>
> It suspect the compiler sees 'const const *x' in some
> places. So I assume that's the trigger for this fault.

So we've been seeing this on AppVeyor too.  As far as I can see,
this happens somewhere between commit 249d9719 and 59fd40d4.  The
file itself has only minor changes, turning some "SSL_CIPHER *"
into "const SSL_CIPHER *", so it's most likely one of the include
files that changed in between.

It includes changes to safestack, including adding inline
functions instead of the defines.  So that is probably why it
fails, but I currently don't see a way to work around this, or how
we could simplify things.

The problem also only seems to have with VC 14/2015.  It works in
all the older versions we have on AppVeyor.

Have you actually tried to contact Microsoft about this issue?


Kurt

_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Using openssl to check for cert reovcation using OCSP

CHOW Anthony
If this is not the correct forum to ask this question, can someone please point me to the right direction.

On the search engine, I can only find articles to use OpenSSL to configure OCSP server and to issue certificate that uses OCSP.

My question is that do I need to write my function to call OpenSSL to use OCSP to check if a certificate is revoked or I can configure OpenSSL to check this by setting flag in openssl.cnf?

Thanks so much for the information,

anthony.
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Erik Forsberg-11
In reply to this post by Kurt Roeckx
I also noticed compiler warnings generated by this code using SunStudio compilers.
This patch fixes those for me and seems to do the correct thing. Maybe it
makes the VC compiler work too ?

*** lhash.h     Thu Jan 14 01:51:33 2016
--- ../../../x64/include/openssl//lhash.h       Wed Jan 27 15:09:47 2016
***************
*** 99,105 ****
          unsigned long name##_LHASH_HASH(const void *);
  # define IMPLEMENT_LHASH_HASH_FN(name, o_type) \
          unsigned long name##_LHASH_HASH(const void *arg) { \
!                 const o_type *a = arg; \
                  return name##_hash(a); }
  # define LHASH_HASH_FN(name) name##_LHASH_HASH
 
--- 99,105 ----
          unsigned long name##_LHASH_HASH(const void *);
  # define IMPLEMENT_LHASH_HASH_FN(name, o_type) \
          unsigned long name##_LHASH_HASH(const void *arg) { \
!                 o_type *a = (o_type *) arg; \
                  return name##_hash(a); }
  # define LHASH_HASH_FN(name) name##_LHASH_HASH
 
***************
*** 108,115 ****
          int name##_LHASH_COMP(const void *, const void *);
  # define IMPLEMENT_LHASH_COMP_FN(name, o_type) \
          int name##_LHASH_COMP(const void *arg1, const void *arg2) { \
!                 const o_type *a = arg1;             \
!                 const o_type *b = arg2; \
                  return name##_cmp(a,b); }
  # define LHASH_COMP_FN(name) name##_LHASH_COMP
 
--- 108,115 ----
          int name##_LHASH_COMP(const void *, const void *);
  # define IMPLEMENT_LHASH_COMP_FN(name, o_type) \
          int name##_LHASH_COMP(const void *arg1, const void *arg2) { \
!                 o_type *a = (o_type *) arg1;             \
!                 o_type *b = (o_type *) arg2; \
                  return name##_cmp(a,b); }
  # define LHASH_COMP_FN(name) name##_LHASH_COMP
 
***************
*** 118,125 ****
          void name##_LHASH_DOALL_ARG(void *, void *);
  # define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
          void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \
!                 o_type *a = arg1; \
!                 a_type *b = arg2; \
                  name##_doall_arg(a, b); }
  # define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG
 
--- 118,125 ----
          void name##_LHASH_DOALL_ARG(void *, void *);
  # define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
          void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \
!                 o_type *a = (o_type *) arg1; \
!                 a_type *b = (o_type *) arg2; \
                  name##_doall_arg(a, b); }
  # define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG
 

>-- Original Message --
>
>On Sat, Jan 16, 2016 at 11:42:52AM +0100, Gisle Vanem wrote:
>> While building OpenSSL from today's git-repo:
>>
>> ssl\d1_srtp.c : fatal error C1001: An internalerror has occurred in the compiler.
>> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
>>  To work around this problem, try simplifying or changing the program near the locations listed above.
>> Please choose the Technical Support command on the Visual C++
>>  Help menu, or open the Technical Support help file for more information
>>
>> INTERNAL COMPILER ERROR in 'f:\gv\VC_2015\bin\cl.exe'
>>     Please choose the Technical Support command on the Visual C++
>>     Help menu, or open the Technical Support help file for more information
>>
>> -----
>>
>> Seems to be related to:
>>   typedef const char *OPENSSL_CSTRING;
>>
>> in safestack.h Changing this into:
>>
>>   #ifdef _MSC_VER
>>   typedef       char *OPENSSL_CSTRING;
>>   #else
>>   typedef const char *OPENSSL_CSTRING;
>>   #endif
>>
>> helps, but triggers the same internal compiler error later on.
>>
>> It suspect the compiler sees 'const const *x' in some
>> places. So I assume that's the trigger for this fault.
>
>So we've been seeing this on AppVeyor too.  As far as I can see,
>this happens somewhere between commit 249d9719 and 59fd40d4.  The
>file itself has only minor changes, turning some "SSL_CIPHER *"
>into "const SSL_CIPHER *", so it's most likely one of the include
>files that changed in between.
>
>It includes changes to safestack, including adding inline
>functions instead of the defines.  So that is probably why it
>fails, but I currently don't see a way to work around this, or how
>we could simplify things.
>
>The problem also only seems to have with VC 14/2015.  It works in
>all the older versions we have on AppVeyor.
>
>Have you actually tried to contact Microsoft about this issue?
>
>
>Kurt
>
>_______________________________________________
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: Using openssl to check for cert reovcation using OCSP

Salz, Rich
In reply to this post by CHOW Anthony

> If this is not the correct forum to ask this question, can someone please point
> me to the right direction.

You might try openssl-users.
 


> My question is that do I need to write my function to call OpenSSL to use
> OCSP to check if a certificate is revoked or I can configure OpenSSL to check
> this by setting flag in openssl.cnf?

You have to write your own code. Openssl does not fetch things automatically.
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Gisle Vanem-3
In reply to this post by Kurt Roeckx
Kurt Roeckx wrote:

> So we've been seeing this on AppVeyor too.  As far as I can see,
> this happens somewhere between commit 249d9719 and 59fd40d4.  The
> file itself has only minor changes, turning some "SSL_CIPHER *"
> into "const SSL_CIPHER *", so it's most likely one of the include
> files that changed in between.
>
> It includes changes to safestack, including adding inline
> functions instead of the defines.  So that is probably why it
> fails, but I currently don't see a way to work around this, or how
> we could simplify things.

I haven't tried Erik Forsberg's patch for lhash.h. And have no
time to look into this. I use TDM-gcc in the meantime.

> Have you actually tried to contact Microsoft about this issue?

No, for the reason above.

--
--gv
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev