All of lore.kernel.org
 help / color / mirror / Atom feed
* [Openvpn-devel] MSVC "parser stack overflow"
@ 2015-12-09 22:05 Gisle Vanem
  2015-12-10  8:36 ` Gert Doering
  0 siblings, 1 reply; 6+ messages in thread
From: Gisle Vanem @ 2015-12-09 22:05 UTC (permalink / raw)
  To: OpenVPN-dev

While compiling src/openvpn/options.c with MSVC 2015, I got this
error:
  src/openvpn/options.c(5944): fatal error C1026: parser stack overflow, program too complex

I've also seen such error in GeoIP-lib due to all the 'if..else if' statements.
Can this be written using some kind of a table-lookup code instead?

-- 
--gv


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Openvpn-devel] MSVC "parser stack overflow"
  2015-12-09 22:05 [Openvpn-devel] MSVC "parser stack overflow" Gisle Vanem
@ 2015-12-10  8:36 ` Gert Doering
  2015-12-10  9:29   ` Arne Schwabe
  2015-12-10  9:58   ` Gisle Vanem
  0 siblings, 2 replies; 6+ messages in thread
From: Gert Doering @ 2015-12-10  8:36 UTC (permalink / raw)
  To: Gisle Vanem <gvanem@; +Cc: OpenVPN-dev

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

Hi,

On Wed, Dec 09, 2015 at 11:05:06PM +0100, Gisle Vanem wrote:
> While compiling src/openvpn/options.c with MSVC 2015, I got this
> error:
>   src/openvpn/options.c(5944): fatal error C1026: parser stack overflow, program too complex
> 
> I've also seen such error in GeoIP-lib due to all the 'if..else if' statements.
> Can this be written using some kind of a table-lookup code instead?

We could, certainly, if we had nothing else to do.

For the time being we just use a compiler that is not mainly a pain in the
back, solidly stuck in the last century before C99 - as in, none of the
core developers compile on windows, we all do cross-compilation with 
mingw64 on Linux.

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@...1296...
fax: +49-89-35655025                        gert@...1297...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Openvpn-devel] MSVC "parser stack overflow"
  2015-12-10  8:36 ` Gert Doering
@ 2015-12-10  9:29   ` Arne Schwabe
  2015-12-10  9:58   ` Gisle Vanem
  1 sibling, 0 replies; 6+ messages in thread
From: Arne Schwabe @ 2015-12-10  9:29 UTC (permalink / raw)
  To: Gert Doering <gert@; +Cc: OpenVPN-dev



Am 10.12.15 um 09:36 schrieb Gert Doering:
> Hi,
>
> On Wed, Dec 09, 2015 at 11:05:06PM +0100, Gisle Vanem wrote:
>> While compiling src/openvpn/options.c with MSVC 2015, I got this
>> error:
>>   src/openvpn/options.c(5944): fatal error C1026: parser stack overflow, program too complex
>>
>> I've also seen such error in GeoIP-lib due to all the 'if..else if' statements.
>> Can this be written using some kind of a table-lookup code instead?
> We could, certainly, if we had nothing else to do.
>
> For the time being we just use a compiler that is not mainly a pain in the
> back, solidly stuck in the last century before C99 - as in, none of the
> core developers compile on windows, we all do cross-compilation with 
> mingw64 on Linux.
>
Or use the experimental Clang frontend for MSVC codegen

http://blogs.msdn.com/b/vcblog/archive/2015/12/04/introducing-clang-with-microsoft-codegen-in-vs-2015-update-1.aspx

As Gert said, that code is old, reliable and well tested. And just about
quirky enough that it is no straighforward table-lookup code conversion.

Arne



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Openvpn-devel] MSVC "parser stack overflow"
  2015-12-10  8:36 ` Gert Doering
  2015-12-10  9:29   ` Arne Schwabe
@ 2015-12-10  9:58   ` Gisle Vanem
  2015-12-10 10:05     ` Arne Schwabe
  2015-12-10 10:19     ` Gert Doering
  1 sibling, 2 replies; 6+ messages in thread
From: Gisle Vanem @ 2015-12-10  9:58 UTC (permalink / raw)
  To: openvpn-devel

Gert Doering wrote:

> For the time being we just use a compiler that is not mainly a pain in the
> back, solidly stuck in the last century before C99 - as in, none of the
> core developers compile on windows, we all do cross-compilation with 
> mingw64 on Linux.

Well, MSVC 2015 is pretty up-to-date WRT C99. So I think you should remove
all the *.vcxproj and msvc-*.bat files to prevent more people getting
the impression you care about Windows.

-- 
--gv


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Openvpn-devel] MSVC "parser stack overflow"
  2015-12-10  9:58   ` Gisle Vanem
@ 2015-12-10 10:05     ` Arne Schwabe
  2015-12-10 10:19     ` Gert Doering
  1 sibling, 0 replies; 6+ messages in thread
From: Arne Schwabe @ 2015-12-10 10:05 UTC (permalink / raw)
  To: Gisle Vanem <gvanem@



Am 10.12.15 um 10:58 schrieb Gisle Vanem:
> Gert Doering wrote:
>
>> For the time being we just use a compiler that is not mainly a pain in the
>> back, solidly stuck in the last century before C99 - as in, none of the
>> core developers compile on windows, we all do cross-compilation with 
>> mingw64 on Linux.
> Well, MSVC 2015 is pretty up-to-date WRT C99. So I think you should remove
> all the *.vcxproj and msvc-*.bat files to prevent more people getting
> the impression you care about Windows.
>
Please note that we are an open source project and have thinly spread
resources. These files still work with older versions. Feel free to
submit patches that fix MSVC 2015 support.

Arne


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Openvpn-devel] MSVC "parser stack overflow"
  2015-12-10  9:58   ` Gisle Vanem
  2015-12-10 10:05     ` Arne Schwabe
@ 2015-12-10 10:19     ` Gert Doering
  1 sibling, 0 replies; 6+ messages in thread
From: Gert Doering @ 2015-12-10 10:19 UTC (permalink / raw)
  To: Gisle Vanem <gvanem@; +Cc: openvpn-devel

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

Hi,

On Thu, Dec 10, 2015 at 10:58:33AM +0100, Gisle Vanem wrote:
> Gert Doering wrote:
> 
> > For the time being we just use a compiler that is not mainly a pain in the
> > back, solidly stuck in the last century before C99 - as in, none of the
> > core developers compile on windows, we all do cross-compilation with 
> > mingw64 on Linux.
> 
> Well, MSVC 2015 is pretty up-to-date WRT C99. So I think you should remove
> all the *.vcxproj and msvc-*.bat files to prevent more people getting
> the impression you care about Windows.

We provide a working build environment to make windows binaries.

We also provided working MSVC files that worked fine until Microsoft broke
their compiler - all older versions of MSVC can compile OpenVPN just fine
(we actually have quite a few commits in our tree to make compilation with
MSVC work, given it's non-support of this or that which works perfectly
well with gcc or clang).

But we're not going to invest large efforts into fixing something that
Microsoft broke.  If you find the magic option to increase their stack 
size which needs to be added to the vcxproj file - we're happy to add
that, but the onus for "it breaks with MSVC" is on who wants that
environment.

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@...1296...
fax: +49-89-35655025                        gert@...1297...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-10 10:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-09 22:05 [Openvpn-devel] MSVC "parser stack overflow" Gisle Vanem
2015-12-10  8:36 ` Gert Doering
2015-12-10  9:29   ` Arne Schwabe
2015-12-10  9:58   ` Gisle Vanem
2015-12-10 10:05     ` Arne Schwabe
2015-12-10 10:19     ` Gert Doering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.