Summary: | Opening the 'save file' and 'preferences' dialog causes firefox to crash. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Da Fox <da.fox.mail> |
Component: | Current packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED INVALID | ||
Severity: | critical | CC: | tomka |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Da Fox
2010-04-10 22:50:46 UTC
I see I forgot to mention that this happens even with a fresh <homedir>/.mozilla directory. Hi, I'm running a setup very similar to yours and I have never seen such a problem. It is potentially related to your CFLAGS. For instance from the gcc manual: -ffast-math This option allows GCC to violate some ANSI or IEEE rules and/or specifications in the interest of optimizing code for speed. For example, it allows the compiler to assume arguments to the sqrt function are non-negative numbers and that no floating-point values are NaNs. This option should never be turned on by any -O option since it can result in incorrect output for programs that depend on an exact implementation of IEEE or ANSI rules/specifications for math functions. ---- Then debugging can not work with -fomit-frame-pointer. Also trouble could be related to -fweb Constructs webs as commonly used for register allocation purposes and assign each web individual pseudo register. This allows the register allocation pass to operate on pseudos directly, but also strengthens several other optimization passes, such as CSE, loop optimizer and trivial dead code remover. It can, however, make debugging impossible, since variables will no longer stay in a “home register”. ------------ In your position I would try to replace your CFLAGS with CFLAGS="-march=pentium-m -O2 -pipe" then recompile fontconfig, firefox and xulrunner, and check again. Even if the problem persists it could be hidden somewhere down the dependency chain of these programs. Hope this helps. (In reply to comment #2) > Hi, I'm running a setup very similar to yours and I have never seen such a > problem. It is potentially related to your CFLAGS. > > For instance from the gcc manual: > > -ffast-math > > This option allows GCC to violate some ANSI or IEEE rules and/or > specifications in the interest of optimizing code for speed. For example, it > allows the compiler to assume arguments to the sqrt function are non-negative > numbers and that no floating-point values are NaNs. > > This option should never be turned on by any -O option since it can result > in incorrect output for programs that depend on an exact implementation of IEEE > or ANSI rules/specifications for math functions. > ---- > > Then debugging can not work with -fomit-frame-pointer. Also trouble could be > related to > > -fweb > > Constructs webs as commonly used for register allocation purposes and > assign each web individual pseudo register. This allows the register allocation > pass to operate on pseudos directly, but also strengthens several other > optimization passes, such as CSE, loop optimizer and trivial dead code remover. > It can, however, make debugging impossible, since variables will no longer stay > in a “home register”. > ------------ > > In your position I would try to replace your CFLAGS with > CFLAGS="-march=pentium-m -O2 -pipe" > > then recompile fontconfig, firefox and xulrunner, and check again. > > Even if the problem persists it could be hidden somewhere down the dependency > chain of these programs. > > Hope this helps. > I realize your objections are all very valid, and I am aware that some of those options are advertised as potentially harmful. The only really 'troublesome' flag however is --ffast-math, both --fomit-frame-pointer and --fweb are safe, albeit that they (as you say) prevent(make it very difficult to do) debugging. Then again, I'm not in the habit of debugging my system programs, so that should be fine. However I have not had this problem prior to upgrading to firefox 3.5.8, and every other program still works perfectly. So I'm confident that it is something in firefox that has broken. Especially for the open/browse/save dialogs I feel the cause must be firefox, since every other program's open/browse/save dialog still works. I have already been trying other versions of some of the dependencies of firefox, e.g. older versions of fontconfig and newer versions of cairo, gtk+, librsvg and pango but without luck. I will try your suggestion however just to be sure, and add -g to the option as well (I will be recompiling those packages with my own cflags again eventually) and see if I can get a better backtrace. I will report back here when that's done. Ok I've tried some things, and it seems you are (partially) correct. When I compile fontconfig with the following CFLAGS: CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer -fweb -mtune=pentium-m -mfpmath=sse -mmmx -msse -msse2 -m32" or CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer -fweb -ffast-math -mtune=pentium-m -m32" firefox works fine. So it's not related to either -ffast-math or -mfpmath=sse, but to the combination of the two. This is odd, especially since it seems to indicate the problem is with fontconfig which worked before, and still works for other programs. Using a self-compiled version of fontconfig I've traced this a bit more, and it seems that it crashes because of a misaligned stack, that is it crashed on a 'movapd' instruction referencing the stack, but the stack was not properly aligned at that address. Also annoying is that it seems that is occasionally does work, since I'm now having trouble reproducing it. Even though I've been recompiling and reprocucing it reliable for some time, it now just seems to keep working... Anyway, I'm not sure what to do now? Is this bug now invalid, because I use -ffast-math? I'm not sure, because it seems that it might also happen without it, since it crashes because of a misaligned memory access from an sse instruction, which might also happen from -mfpmath=sse alone (it might have 'just worked' on my test, just like I'm having trouble reproducing the issue now). Could this be a gcc bug? Google turned up the following bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 Hi again, I will be closing this bug as "invalid" as it does not apply apply to gentoo as a distribution. If you think fontconfig should work fine with your compiler options you could contact upstream, or gcc upstream. I don't know enough about compiler internals to judge here. |