User-Agent: Opera/9.24 (X11; Linux i686; U; en) Build Identifier: NSS_3_12_ALPHA_2B The change to use optimize-for-size (bug 389781) in optimized builds causes crash during xulrunner startup on Linux/ARM, likely due to GCC miscompiling something. Only happens when optimizing for size (-Os), changing it back to optimize for speed (-O2) or disabling optimization makes this crash go away. gcc --version says: sbox-arm-none-linux-gnueabi-gcc (CodeSourcery Sourcery G++ Lite 2007q3-51) 4.2.1 Reproducible: Always
Summary: Crash in NSS initialization on Linux/ARM (CodeSourcery 2007q3-51 toolchain) → GCC miscompiles NSS when optimizing for size on Linux/ARM
Whiteboard: CodeSourcery 2007q3-51 toolchain
gcc bugs should be filed against gcc, not NSS . You should contact the gcc developers to get this fixed. You can already build optimized for speed as before by not setting OPT_CODE_SIZE = 1 in the NSS build , so no NSS change needs to be made to workaround this gcc bug .
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
Created attachment 310804 [details] [diff] [review] WORKAROUND
Assignee: nobody → doug.turner
Status: RESOLVED → ASSIGNED
Ever confirmed: true
Resolution: WONTFIX → ---
Comment on attachment 310804 [details] [diff] [review] WORKAROUND Changing the makefile to stop optimizing for code size may be OK for one single platform, but not for all platforms.
Attachment #310804 - Flags: review-
Comment on attachment 310804 [details] [diff] [review] WORKAROUND Please try something like this: DEFAULT_GMAKE_FLAGS += BUILD_OPT=1 ifeq ($(OS_ARCH)_$(TARGET_CPU),Linux_arm) # Work around a GCC bug (see Bugzilla bug 408071). DEFAULT_GMAKE_FLAGS += OPT_CODE_SIZE=0 else DEFAULT_GMAKE_FLAGS += OPT_CODE_SIZE=1 endif
brad, you're using 4.2.x, right? Is this still a problem for you.
If someone wants to submit a patch to change NSS (not PSM) to build without space optimizations on Linux/Arm platforms ONLY, that would be considered. Otherwise, this bug is a WONTFIX. The best solution, IMO, is to get a working compiler.
Status: NEW → RESOLVED
Last Resolved: 10 years ago → 10 years ago
Resolution: --- → WONTFIX
Doug, what is your workaround for this GCC optimization bug?
I am not seeing it. I asked blassey, and he has not. we are using CS2007q3 gcc 4.2.
You need to log in before you can comment on or make changes to this bug.