[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #32 from rguenth at gcc dot gnu dot org 2009-09-10 08:52 --- Subject: Bug 41254 Author: rguenth Date: Thu Sep 10 08:52:36 2009 New Revision: 151590 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=151590 Log: 2009-09-10 Richard Guenther rguent...@suse.de PR middle-end/41254 * tree.c (struct free_lang_data_d): Add worklist member. (find_decls_types_r): Push onto the worklist instead of recursing. Handle TREE_BINFOs properly. (find_decls_types): New function wrapped around find_decls_types_r to process the worklist. (find_decls_types_in_eh_region): Use it. (find_decls_types_in_node): Likewise. (find_decls_types_in_var): Likewise. (free_lang_data_in_cgraph): Likewise. Free the worklist. * tree.h (RECORD_OR_UNION_TYPE_P): New. (AGGREGATE_TYPE_P): Adjust. Modified: trunk/gcc/ChangeLog trunk/gcc/tree.c trunk/gcc/tree.h -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #33 from rguenth at gcc dot gnu dot org 2009-09-10 09:24 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #31 from t7 at gmail dot com 2009-09-09 09:08 --- Sorry about the delayed testing. With the same gcc revision (without patch applied) and with -Wl,--stack=0x2000 as suggested by Danny. cc1plus.exe still crashed while running the following command. g++ -c -include tmp\obj\release_static\qt_gui_pch.h -pipe -O0 -m64 -Wl,--stack=0x2000 -Wall -frtti -fno-exceptions -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -D_USE_MATH_DEFINES -DQT_NO_DIRECTDRAW -DPNG_NO_ASSEMBLER_CODE -DQT_RASTER_IMAGEENGINE -DQT_RASTER_PAINTENGINE -DQT_NO_CUPS -DQT_NO_LPR -DQT_HAVE_MMX -DQT_NO_FREETYPE -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -I..\..\include\QtCore -I..\..\include -I..\..\include\QtGui -Itmp\rcc\release_static -Itmp -I..\3rdparty\wintab -I..\3rdparty\libpng -I..\3rdparty\zlib -I..\3rdparty\harfbuzz\src -Idialogs -I..\..\include\ActiveQt -Itmp\moc\release_static -I. -I..\..\mkspecs\win32-g++ -o tmp\obj\release_static\qwidget.o kernel\qwidget.cpp So in conclusion, qt4 library compilation complete with -O0 and fix-fld-recursion patch applied to gcc. With -O the compiled qmake.exe will run crash, comment #14. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #12 from rguenth at gcc dot gnu dot org 2009-09-06 10:13 --- Created an attachment (id=18516) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18516action=view) patch here it is -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #13 from t7 at gmail dot com 2009-09-06 12:55 --- (In reply to comment #12) Created an attachment (id=18516) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18516action=view) [edit] patch here it is Confirm fixed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #14 from t7 at gmail dot com 2009-09-06 13:57 --- (In reply to comment #12) Created an attachment (id=18516) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18516action=view) [edit] patch here it is For some reason this leads to : Problem signature: Problem Event Name: APPCRASH Application Name: qmake.exe Application Version: 0.0.0.0 Application Timestamp:4aa3bdce Fault Module Name:qmake.exe Fault Module Version: 0.0.0.0 Fault Module Timestamp: 4aa3bdce Exception Code: c005 Exception Offset: 0040e132 Program received signal SIGSEGV, Segmentation fault. 0x0080e132 in QString::at () (gdb) bt #0 0x0080e132 in QString::at () #1 0x in ?? () (gdb) info register srax0x0 0 rcx0x22f000 2289664 rdx0x34dc60 3464288 rbx0x22f000 2289664 rsp0x22ef80 2289536 rbp0x6 6 rsi0x34dc60 3464288 rdi0x34dae0 3463904 r8 0x0 0 r9 0x22f230 2290224 r100x6c0073005c0065 30399791412019301 r110x34dcfa 3464442 r120x342310 3416848 r130xa 10 r140x0 0 r150x0 0 rip0x80e132 0x80e132 QString::at(int) const+26 eflags 0x10206 [ PF IF RF ] cs 0x33 51 ss 0x2b 43 ds 0x2b 43 es 0x2b 43 fs 0x53 83 gs 0x2b 43 disass $pc-30 $pc+30 Dump of assembler code from 0x80e114 to 0x80e150: 0x0080e114 _ZNK7QScript9CFunction4typeEv+12: or %al,%bl 0x0080e116 _ZNK7QScript9CFunction4typeEv+14: nop 0x0080e117 _ZNK7QScript9CFunction4typeEv+15: nop 0x0080e118 _ZNK7QString2atEi+0: sub$0x38,%rsp 0x0080e11c _ZNK7QString2atEi+4: mov%rbx,0x28(%rsp) 0x0080e121 _ZNK7QString2atEi+9: mov%rsi,0x30(%rsp) 0x0080e126 _ZNK7QString2atEi+14: mov%rcx,%rbx 0x0080e129 _ZNK7QString2atEi+17: mov%edx,%esi 0x0080e12b _ZNK7QString2atEi+19: test %edx,%edx 0x0080e12d _ZNK7QString2atEi+21: js 0x80e137 _ZNK7QString2atEi+31 0x0080e12f _ZNK7QString2atEi+23: mov(%rcx),%rax 0x0080e132 _ZNK7QString2atEi+26: cmp0x8(%rax),%edx 0x0080e135 _ZNK7QString2atEi+29: jl 0x80e150 _ZNK7QString2atEi+56 0x0080e137 _ZNK7QString2atEi+31: mov$0x2ad,%r8d 0x0080e13d _ZNK7QString2atEi+37: lea0x18f0c(%rip),%rdx # 0x827050 _data_end__+1936 0x0080e144 _ZNK7QString2atEi+44: lea0x18f7e(%rip),%rcx # 0x8270c9 _data_end__+2057 0x0080e14b _ZNK7QString2atEi+51: callq 0x640d37 _Z9qt_assertPKcS0_i -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #16 from rguenth at gcc dot gnu dot org 2009-09-06 14:07 --- Try building without the patch but with unlimited stack (ulimit -s unlimited) and see if the same error appears. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #15 from t7 at gmail dot com 2009-09-06 13:59 --- (gdb) print $pc $1 = (void (*)()) 0x80e132 QString::at(int) const+26 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #17 from rguenth at gcc dot gnu dot org 2009-09-06 16:51 --- The patch bootstrapped and tested ok but I'm holding off until you confirm it's not the reason for the issue you see. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #18 from t7 at gmail dot com 2009-09-06 21:59 --- (In reply to comment #17) The patch bootstrapped and tested ok but I'm holding off until you confirm it's not the reason for the issue you see. I can confirm, that indeed patch fixed this bug. Yes patch bootstrapped and cross compiled and compiled the cross compiler and native compiler ok, what I meant was this patch actually causes another new regression/issues to surface. I am using the 64-bit x86_64-w64-mingw32-g++ binary on windows to compile qt4 what is happening now is that it will compile qmake.exe just fine. As soon as qmake.exe is run ie, qmake.exe qt-all-opensource-src-4.5.2/src/plugins/accessible/widgets/widgets.pro -o Makefile -spec win32-g++ it crashes. It should be another issue, should I make another bug report then? You can close this bug as resolved. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #19 from rguenther at suse dot de 2009-09-06 22:02 --- Subject: Re: [4.5 Regression] crashed compile Qt4 gui library On Sun, 6 Sep 2009, t7 at gmail dot com wrote: --- Comment #18 from t7 at gmail dot com 2009-09-06 21:59 --- (In reply to comment #17) The patch bootstrapped and tested ok but I'm holding off until you confirm it's not the reason for the issue you see. I can confirm, that indeed patch fixed this bug. Yes patch bootstrapped and cross compiled and compiled the cross compiler and native compiler ok, what I meant was this patch actually causes another new regression/issues to surface. I am using the 64-bit x86_64-w64-mingw32-g++ binary on windows to compile qt4 what is happening now is that it will compile qmake.exe just fine. As soon as qmake.exe is run ie, qmake.exe qt-all-opensource-src-4.5.2/src/plugins/accessible/widgets/widgets.pro -o Makefile -spec win32-g++ it crashes. It should be another issue, should I make another bug report then? You can close this bug as resolved. Well, the patch may cause this issue, no? Before the patch qmake didn't build? So I asked you to fix this bug by increasing the maximum stack size and not by applying the patch to see if the patch causes the qmake issue. Or is there a reason the patch can't be the reason for the qmake failure? Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #20 from t7 at gmail dot com 2009-09-06 22:14 --- (In reply to comment #16) Try building without the patch but with unlimited stack (ulimit -s unlimited) and see if the same error appears. Actually can't try this because I'm using the native compiler to build qt4.(In reply to comment #19) Subject: Re: [4.5 Regression] crashed compile Qt4 gui library On Sun, 6 Sep 2009, t7 at gmail dot com wrote: --- Comment #18 from t7 at gmail dot com 2009-09-06 21:59 --- (In reply to comment #17) The patch bootstrapped and tested ok but I'm holding off until you confirm it's not the reason for the issue you see. I can confirm, that indeed patch fixed this bug. Yes patch bootstrapped and cross compiled and compiled the cross compiler and native compiler ok, what I meant was this patch actually causes another new regression/issues to surface. I am using the 64-bit x86_64-w64-mingw32-g++ binary on windows to compile qt4 what is happening now is that it will compile qmake.exe just fine. As soon as qmake.exe is run ie, qmake.exe qt-all-opensource-src-4.5.2/src/plugins/accessible/widgets/widgets.pro -o Makefile -spec win32-g++ it crashes. It should be another issue, should I make another bug report then? You can close this bug as resolved. Well, the patch may cause this issue, no? yes Before the patch qmake didn't build? no. Before the patch qmake was built and running ok. So I asked you to fix this bug by increasing the maximum stack size and not by applying the patch to see if the patch causes the qmake issue. Well I think we have some misunderstanding here, initially it is cc1plus.exe that crash g++ (native) built the qt4 - qmake.exe ok - qt4 src/core ok - qt4 src/guifailed (cc1plus.exe crashed) Or is there a reason the patch can't be the reason for the qmake failure? I think the patch should be the reason for qmake crash, but, before the patch I tested with gcc revision 151400, now with gcc revision 151458 + patch applied. Could this be the reason? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #21 from rguenth at gcc dot gnu dot org 2009-09-06 22:19 --- Yes, that could be the reason. Can you test the same revision without the patch again? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #22 from t7 at gmail dot com 2009-09-06 22:20 --- (In reply to comment #16) Try building without the patch but with unlimited stack (ulimit -s unlimited) and see if the same error appears. You mean cross compile the native compiler from linux by setting the shell with command ulimit -s unlimited ? Or you want me to build the cross compiler and native compiler then try and build qt4? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #23 from t7 at gmail dot com 2009-09-06 22:21 --- (In reply to comment #16) Try building without the patch but with unlimited stack (ulimit -s unlimited) and see if the same error appears. This is under MSys/Mingw shell $ ulimit -s unlimited sh: ulimit: stack size: cannot modify limit: Invalid argument -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #24 from rguenther at suse dot de 2009-09-06 22:22 --- Subject: Re: [4.5 Regression] crashed compile Qt4 gui library On Sun, 6 Sep 2009, t7 at gmail dot com wrote: --- Comment #22 from t7 at gmail dot com 2009-09-06 22:20 --- (In reply to comment #16) Try building without the patch but with unlimited stack (ulimit -s unlimited) and see if the same error appears. You mean cross compile the native compiler from linux by setting the shell with command ulimit -s unlimited ? Or you want me to build the cross compiler and native compiler then try and build qt4? Just the same way as you reported the bug (I understand that this was a native compiler issue?). There surely must be a way to increase the maximum stack size with windows? Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #25 from t7 at gmail dot com 2009-09-06 22:27 --- (In reply to comment #21) Yes, that could be the reason. Can you test the same revision without the patch again? Ok there maybe a reason for qmake.exe crash, during the process, I changed the O flag for building the qt4 library (before the patch in my script for building qt4 -O0 due to that it will g++ will ICE see (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41153)) After the patch I changed that from -O0 to -O2 and for qmake.exe changed from -O0 (I had to do this or g++ will ICE) back to -O (original) because I thought that pr41153 does not affect the gcc-trunk 4.5 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #26 from t7 at gmail dot com 2009-09-06 22:30 --- (In reply to comment #24) Just the same way as you reported the bug (I understand that this was a native compiler issue?). There surely must be a way to increase the maximum stack size with windows? Yes this was native compiler issue. I have no idea on how to increase the max stack size with windows.. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #27 from t7 at gmail dot com 2009-09-06 22:41 --- Ok I just found out that it is the -O and up causing the problem, I just changed script back to -O0 and it compiles and runs fine, right now up to corelib. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #28 from t7 at gmail dot com 2009-09-06 22:43 --- Thank you for the help, this bug can be close. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #29 from t7 at gmail dot com 2009-09-06 22:55 --- Confirmed that qt4 library build was complete with -O0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #30 from dannysmith at users dot sourceforge dot net 2009-09-07 04:01 --- (In reply to comment #24) Subject: Re: [4.5 Regression] crashed compile Qt4 gui library On Sun, 6 Sep 2009, t7 at gmail dot com wrote: --- Comment #22 from t7 at gmail dot com 2009-09-06 22:20 --- (In reply to comment #16) Try building without the patch but with unlimited stack (ulimit -s unlimited) and see if the same error appears. You mean cross compile the native compiler from linux by setting the shell with command ulimit -s unlimited ? Or you want me to build the cross compiler and native compiler then try and build qt4? Just the same way as you reported the bug (I understand that this was a native compiler issue?). There surely must be a way to increase the maximum stack size with windows? To increase the stack size on windows, add -Wl,--stack=0x2000 (for eg 32 Mb stack). This hard codes the exe's stack size into the program header. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Component|c++ |middle-end Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2009-09-05 21:05:04 date|| Summary|crashed compile Qt4 gui |[4.5 Regression] crashed |library |compile Qt4 gui library Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #8 from rguenth at gcc dot gnu dot org 2009-09-05 21:10 --- Created an attachment (id=18515) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18515action=view) testcase Recursion depth of 1200 with the following simple testcase (well, more - it segfaults with 1mb stack). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #9 from rguenth at gcc dot gnu dot org 2009-09-05 21:12 --- The original testcase works fine with unlimited stack. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #10 from rguenth at gcc dot gnu dot org 2009-09-05 22:29 --- I have a patch. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2009-09-05 21:05:04 |2009-09-05 22:29:36 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254
[Bug middle-end/41254] [4.5 Regression] crashed compile Qt4 gui library
--- Comment #11 from t7 at gmail dot com 2009-09-06 00:03 --- I can test the patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41254