Bug 440139 - gcc crashes while compiling Wine with optimization turned on
gcc crashes while compiling Wine with optimization turned on
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
http://www.winehq.org/site/download/
:
: 443165 443536 445494 447281 447584 448868 451420 455177 455549 456790 458903 459913 460569 467543 468909 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-01 17:09 EDT by Michael Stefaniuc
Modified: 2009-02-24 15:40 EST (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-03 05:25:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Preprocessed C code of Wine's source file dlls/user32/tests/menu.c (83.68 KB, application/x-gzip)
2008-04-01 17:09 EDT, Michael Stefaniuc
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 35204 None None None Never
GNU Compiler Collection 35811 None None None Never

  None (edit)
Description Michael Stefaniuc 2008-04-01 17:09:22 EDT
Description of problem:
gcc crashes while compiling Wine's dlls/user32/tests/menu.c file:
predeal:~/j/wine/build/wine/dlls/user32/tests$ make
gcc -c -I../../../../../source/wine/dlls/user32/tests -I.
-I../../../../../source/wine/include -I../../../include   -D_REENTRANT -fPIC
-Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings
-Wtype-limits -Wpointer-arith  -g -O2  -o menu.o
../../../../../source/wine/dlls/user32/tests/menu.c
{standard input}: Assembler messages:
{standard input}:7400: Warning: end of file not at end of a line; newline inserted
{standard input}:7732: Error: bad register name `%'
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.

No /tmp/cc* files are generated. With -save-temps instead of -pipe a
corrupt/unfinished menu.s gets generated. Size of the unfinished menu.s  varies
depending on the optimization level aka -O, -O2 and -O3.

The crash can be reproduced also with the preprocessed menu.i (attached).
"gcc -c -O -o menu.o menu.i" is enough to reproduce the problem.

There is no crash with disabled optimization. The code compiles fine on an
up2date RHEL5 as well as an up2date F8.


Version-Release number of selected component (if applicable):
gcc-4.3.0-5.i386

How reproducible:
Always

Steps to Reproduce:
1. Build Wine version 0.9.58 or any later checkout from git, or
2. "gcc -c -O -o menu.o menu.i" of the attached menu.i file.
3.
  
Actual results:
Segfault while writing out the assembler code.

Expected results:
Successful compilation of the file.

Additional info:
This is on an up2date F9/Rawhide on a 4 year old OptiPlex GX270 with a P4 2.8
GHz with HT enabled and running a SMP kernel:
Linux predeal 2.6.25-0.177.rc7.git6.fc9.i686 #1 SMP Mon Mar 31 13:30:54 EDT 2008
i686 i686 i386 GNU/Linux
The box has 1 GB RAM with 2GB swap.
Comment 1 Michael Stefaniuc 2008-04-01 17:09:22 EDT
Created attachment 299969 [details]
Preprocessed C code of  Wine's source file dlls/user32/tests/menu.c
Comment 2 Michael Stefaniuc 2008-04-01 17:13:51 EDT
Looks like bugzilla has gzip the attachment a second time. Sorry about that. 
Comment 3 Jakub Jelinek 2008-04-03 05:25:41 EDT
Tracking this upstream.
Comment 4 Jakub Jelinek 2008-04-18 18:27:37 EDT
*** Bug 443165 has been marked as a duplicate of this bug. ***
Comment 5 Jakub Jelinek 2008-04-22 10:54:55 EDT
*** Bug 443536 has been marked as a duplicate of this bug. ***
Comment 6 Andreas Bierfert 2008-05-13 07:37:01 EDT
Is there any news on this? I see that there still is some discussion in upstream
#35204. What would be the recommended way to go because wine still fails on >=F9
and thus effectively blocks updates for F7,F8 as well.
Comment 7 John Reiser 2008-05-13 09:58:06 EDT
(In reply to comment #6)
For a work-around, then compile menu.c without "-O2".  I do it by hand, but it
could be automated by adding an explicit target for menu.o to the Makefile, and
editing CC_FLAGS to delete the "-O2" before invoking the compiler.
Comment 8 Jakub Jelinek 2008-05-19 06:39:26 EDT
You can just compile menu.c with -O2 -fno-tree-fre -fno-tree-pre as workaround,
see PR35204.
Comment 9 Jakub Jelinek 2008-05-19 06:39:42 EDT
*** Bug 447281 has been marked as a duplicate of this bug. ***
Comment 10 Jakub Jelinek 2008-05-20 12:28:46 EDT
*** Bug 447584 has been marked as a duplicate of this bug. ***
Comment 11 Jakub Jelinek 2008-05-29 03:48:11 EDT
*** Bug 448868 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Jelinek 2008-05-29 12:54:53 EDT
*** Bug 445494 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Jelinek 2008-06-15 18:39:45 EDT
*** Bug 451420 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Jelinek 2008-07-14 10:18:30 EDT
*** Bug 455177 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Jelinek 2008-07-16 03:18:55 EDT
*** Bug 455549 has been marked as a duplicate of this bug. ***
Comment 16 Jakub Jelinek 2008-08-13 05:15:41 EDT
*** Bug 458903 has been marked as a duplicate of this bug. ***
Comment 17 Fred Wittekind IV 2008-08-13 09:28:10 EDT
Upstream 35811 marked RESOLVED / DUPLICATE of bug 35204 2008-04-03 09:53
Upstream 35204 marked RESOLVED / FIXED 2008-05-20 20:58

Is it possible now to get this patch included an updated package for Fedora 9?
Comment 18 Jakub Jelinek 2008-08-29 03:18:59 EDT
*** Bug 460569 has been marked as a duplicate of this bug. ***
Comment 19 Jakub Jelinek 2008-08-29 03:19:35 EDT
*** Bug 459913 has been marked as a duplicate of this bug. ***
Comment 20 Jakub Jelinek 2008-10-20 02:33:28 EDT
*** Bug 456790 has been marked as a duplicate of this bug. ***
Comment 21 Jakub Jelinek 2008-10-20 02:33:43 EDT
*** Bug 467543 has been marked as a duplicate of this bug. ***
Comment 22 Jakub Jelinek 2008-10-31 12:54:42 EDT
*** Bug 468909 has been marked as a duplicate of this bug. ***
Comment 23 Fedora Update System 2009-02-24 15:40:38 EST
wine-1.1.14-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.