Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66028 - Mozilla family dislikes -fstack-protector-all
Summary: Mozilla family dislikes -fstack-protector-all
Status: RESOLVED DUPLICATE of bug 83511
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-01 08:19 UTC by John Richard Moser
Modified: 2005-12-23 02:17 UTC (History)
0 users

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 John Richard Moser 2004-10-01 08:19:32 UTC
The Mozilla family of applications appears to not like -fstack-protector-all.  With -fstack-protector, they work.  Symptoms include segfaulting on start-up.

I've confirmed this on amd6/4x86_64.  Below are the ebuilds I tested that were affected.

mozilla-1.7.3 (haven't tested higher or lower)
mozilla-firefox-1.0_pre-r1 (haven't tested higher or lower)
mozilla-thunderbird-0.7.3-r1
mozilla-thunderbird-0.8.0

I also tried epiphany and Galeon, but they're strange.  I can't make epiphany start up without crashing no matter WHAT I do; and Galeon just crashes randomly, so I can't solidly confirm that (and hence didn't test).

Reproducible: Always
Steps to Reproduce:
1.  Build Mozilla, Firefox, or Thunderbird -fstack-protector-all
2.  Try to run

Actual Results:  
Segfault

Expected Results:  
Uhh, work?

I'm using a hardened toolchain.  It has been found that -fno-stack-protector
will filter -fno-stack-protector and leave -fstack-protector on, if
-fstack-protector is also on.

Some people may enable -fstack-protector-all.  Filtering it may disable
-fstack-protector.  The following logic may be best:

replace-flags -fstack-protector-all -fstack-protector
append-flags -fno-stack-protector-all

This should ensure that -all users get -fstack, and that hardened users get no -all.
Comment 1 John Richard Moser 2004-10-01 08:20:13 UTC
"I've confirmed this on amd6/4x86_64.  Below are the ebuilds I tested that were affected."

amd64/x86_64

Please test on x86 and other archs.
Comment 2 John Richard Moser 2004-10-01 09:47:24 UTC
uhh

thunderbird -fno-stack-protector's, I gotta retest that.  The other two stand.
Comment 3 John Richard Moser 2004-10-01 11:15:06 UTC
alright, thunderbird starts.

icebox bluefox # grep __guard /usr/lib/MozillaThunderbird/thunderbird-bin
Binary file /usr/lib/MozillaThunderbird/thunderbird-bin matches

Yes.  0.7.3-r1 works with -fstack-protector
Comment 4 John Richard Moser 2004-10-01 11:16:12 UTC
Eratta:

"I'm using a hardened toolchain.  It has been found that -fno-stack-protector
will filter -fno-stack-protector and leave -fstack-protector on, if
-fstack-protector is also on."

Was I even awake when I wrote this?  Replace with the below paragraph:

I'm using a hardened toolchain.  It has been found that -fno-stack-protector-all
will filter -fstack-protector-all and leave -fstack-protector on, if
-fstack-protector is also on.
Comment 5 Brad Laue (RETIRED) gentoo-dev 2004-10-03 10:07:01 UTC
Okay, so the recommendation is to add -fno-stack-protector-all and put in -fstack-protector? One of our devs did this with firefox recently, so I have no problem making it global on amd64.
Comment 6 John Richard Moser 2004-12-04 14:01:46 UTC
Yes, the resolution is to s/-fstack-protector-all/fstack-protector/
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2005-12-23 02:17:16 UTC
Tracking this at Bug 83511 now...

*** This bug has been marked as a duplicate of 83511 ***