http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56597



--- Comment #3 from jjwang <kruglinski at gmail dot com> 2013-03-12 13:24:15 
UTC ---

(In reply to comment #2)

> "but when I try to run a test program compiled by VC++ that use the Dlls

> compiled by gcc"

> 

> so I assume this is on mingw32/64.  Which means that whatever ABI is

> in effect is either violated by VC++ or by GCC.

> 

> CCing win target maintainers.  Please resolve whether this is a GCC or

> a VC++ bug.



This problem are very clear, mingw/gcc 4.7.2 generate implicit SSE2

instructions that require alignment and gcc just leave everything as it is,

then VC++ does not aligns the program's stack and call to the DLLs(shared

library in windows) produced by GCC, finally the program crashed!



In my view I think even VC++ does not aligns the stack, the function exported

by a DLL that compiled by GCC should self-aligned not just leave things as it

is, Specifically when GCC decide to use the vector instructions that require

alignment(just like SSE2), and users never realized it!



I think the bottom line is "program can't just crashed!"



ps:

follow Jakub Jelinek's says I add "-mstackrealign" option, the issue is gone,

so Strictly speaking it can't be a bug, just a Potential issue.



regards



03-12-2013 jjwang

Reply via email to