Comment 0 for bug 263014

Revision history for this message
In , Mozilla (mozilla) wrote :

(that also applies to 1.8)

With recent gcc and glibc versions (and certain compile options (_FORTIFY_SOURCE))
running Firefox aborts immediately because of:

#3 0x00007fff0c373397 in *__GI___fortify_fail (
    msg=0x7fff0c3abd2f "buffer overflow detected") at fortify_fail.c:32
No locals.
#4 0x00007fff0c3717a0 in *__GI___chk_fail () at chk_fail.c:29
No locals.
#5 0x00007fff0c371ebb in __realpath_chk (
    buf=0x71d1 <Address 0x71d1 out of bounds>,
    resolved=0x71d1 <Address 0x71d1 out of bounds>, resolvedlen=6)
    at realpath_chk.c:30
No locals.
#6 0x0000000000448909 in XRE_GetBinaryPath (
    argv0=0x71d1 <Address 0x71d1 out of bounds>, aResult=0x7fff1a234a00)

That's in http://mxr.mozilla.org/seamonkey/source/toolkit/xre/nsAppRunner.cpp#1435

It seems MAXPATHLEN is 1024 here while glibc is using 4096 (AFAIK).
MAXPATHLEN in
http://mxr.mozilla.org/mozilla1.8/source/toolkit/xre/nsAppRunner.h#45
should use PATH_MAX as in
http://mxr.mozilla.org/mozilla1.8/source/xpcom/build/nsXPCOMPrivate.h#247