matham added the comment:

Well, we won't have to wait until interested solves it. After hours of 
debugging including compiling Python with VS2013 and looking at windows dump 
files, it seems that hard work pays off - sorry, I mean asking someone who 
knows the answer pays off :P.

I asked on #mingw and it was suggested that I use mingw compiled with the SJLJ 
exception model. And indeed, using sjlj fixed this so that it does not crash 
anymore. It seems that mingw from mingw.org compiles with 
`"--disable-sjlj-exceptions`, so one has to use mingw-w64's distribution which 
offers a sjlj build (for x86 and SEH for x64).

I am wondering whether this information should be somewhere on the python 
website so that other people do not run into this issue. I'm not sure what the 
proper resolution is here so I'll live it open. Or maybe it should be open 
until the docs is updated to warn about this issue.

Anyway, here's the pertinent parts of my #mingw chat:

<jon_y> matham: I suggest going for SJLJ on 32bit
<jon_y> SEH on 64bit
<jon_y> avoid dw2 exception like the plague
<matham> ok, the one I got from mingw-get says "--disable-sjlj-exceptions 
--with-dwarf2"
<matham> I'll try with sjlj
<matham> from mingw-w64
<matham> jon_y, \o/\o/\o/\o/\o/\o/\o/ omg I'm so happy :D it looks like using 
sjlj fixed it
<jon_y> matham: I mean --disable-sjlj-exceptions
<jon_y> that is the C++ exception part
<jon_y> dwarf2 as debug is fine
<jon_y> --with-dwarf2 specifies the debug data format
<jon_y> yeah, dw2 (when --disable-sjlj-exceptions is used) has lots of issues 
with python
<matham> so the problem is when sjlj is disabled?
<matham> I thought it was either/or with sjlj vs dw2
<jon_y> dw2 doesn't quite work right for windows
<jon_y> it requires ALL dll code use the same shared libgcc dll
<jon_y> failure to do so leads to random crashes, especially during program 
termination
<matham> so why does mingw-get automatically do --disable-sjlj-exceptions?
<jon_y> mingw.org only provides toolchain that uses dw2 exceptions
<jon_y> this has been so ever since the 4.2.1 days
<jon_y> (that was the first widely used Windows gcc 4.x version)
<jon_y> matham: Cygwin had the same problem with python and their dw2 gcc 
recently
<jon_y> but had some local patches done in to fix it

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23743>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to