Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301536 - Wine needs to be built with -D_FORTIFY_SOURCE=0
Summary: Wine needs to be built with -D_FORTIFY_SOURCE=0
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major with 1 vote (vote)
Assignee: Wine Maintainers
URL: http://bugs.winehq.org/show_bug.cgi?i...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-19 16:43 UTC by James Le Cuirot
Modified: 2010-01-31 17:50 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2010-01-19 16:43:45 UTC
IE6 and IE7 (and probably many other Windows applications) are broken on Gentoo when using glibc 2.11 or later. A longjmp check has been added to glibc that causes them to crash with "longjmp causes uninitialized stack frame". This check is only enabled when _FORTIFY_SOURCE > 0. Normally the default is 0 but Gentoo overrides this to 2 in its GCC patches.

"NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is
activated when @option{-O} is set to 2 or higher.  This enables additional
compile-time and run-time checks for several libc functions.  To disable,
specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}."

Building Wine with -D_FORTIFY_SOURCE=0 avoids the problem. It's been suggested in the Wine bug report that the underlying problem should be fixed but it's also been suggested that something that causes crashes on "false positives" should be opt-in. I'd personally prefer to have _FORTIFY_SOURCE set to 2 by default as we are doing already. Hopefully they'll fix the underlying problem anyway.
Comment 1 Rafał Mużyło 2010-01-20 13:09:15 UTC
I'd say upstream resolution is incorrect, but...
Comment 2 Mike Reardon 2010-01-22 23:46:06 UTC
I can confirm that the resolution does work.

I had the same error when trying to launch the FirstClass client, so I rebuilt wine with -D_FORTIFY_SOURCE=0 and now it will launch.
Comment 3 James Le Cuirot gentoo-dev 2010-01-30 11:07:22 UTC
This has been worked around upstream, at least for now.
Comment 4 SpanKY gentoo-dev 2010-01-30 21:16:46 UTC
Gentoo isnt the only distro to enable fortify by default, and the upstream report seemed short on details as to why the fortify code was doing something wrong.  either way, i see this being something they need to address.
Comment 5 Rafał Mużyło 2010-01-31 17:50:09 UTC
I wonder if wine devs will even try to discuss it with glibc upstream.
If they do, the answer may be interesting.