Open Bug 864023 Opened 9 years ago Updated 9 years ago

ASAN builds crashing on startup


(Core :: General, defect)

Not set





(Reporter: inferno, Unassigned)


(Blocks 1 open bug)


(Whiteboard: [asan])

I tried building ASANified Firefox with clang r176408, r179830, but it crashes on startup. I thought it might be related to, so even tried ASAN_OPTIONS=handle_segv=0:strict_memcmp=0:alloc_dealloc_mismatch=0, but still same crash. Also tried with builds from, but they crash the same way.
Actually, just found the reason, -silent command line flag is causing the crash, if i remove that flag, it works fine.
Closed: 9 years ago
Resolution: --- → INVALID
Even if it's only with -silent or any other command line flag, it still shouldn't happen and we should fix it. Can you post a stack (best from a debug build, but an opt stack is better than none)?
Flags: needinfo?(inferno)
Resolution: INVALID → ---
Whiteboard: [asan]
I got confused here, there are two bugs

1. One with latest clang, r179830. This is a startup crash and it does not matter what command line you use.

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000000000417c35 in clock_gettime ()
#2  0x00007ffff0505d19 in Startup ()
    at xpcom/ds/TimeStamp_posix.cpp:149
#3  0x00007ffff7de9306 in call_init (l=<optimized out>, argc=6, 
    argv=0x7fffffffddf8, env=0x7fffffffde30) at dl-init.c:85
#4  0x00007ffff7de93df in call_init (env=<optimized out>, 
    argv=<optimized out>, argc=<optimized out>, l=<optimized out>)
    at dl-init.c:52
#5  _dl_init (main_map=0x61a00001b680, argc=6, argv=0x7fffffffddf8, 
    env=0x7fffffffde30) at dl-init.c:134
#6  0x00007ffff7dedada in dl_open_worker (a=0x7fffffffa490) at dl-open.c:549
#7  0x00007ffff7de9176 in _dl_catch_error (objname=0x7fffffffa4d8, 
    errstring=0x7fffffffa4e0, mallocedp=0x7fffffffa4ef, 
    operate=0x7ffff7ded700 <dl_open_worker>, args=0x7fffffffa490)
    at dl-error.c:178
#8  0x00007ffff7ded31a in _dl_open (
    file=0x7fffffffa740 "objdir-ff-asan/dist/bin/", mode=-2147483391, 
    caller_dlopen=0x431250 <XPCOMGlueStartup()+1120>, nsid=-2, argc=6, 
---Type <return> to continue, or q <return> to quit--- 
    argv=<optimized out>, env=0x7fffffffde30) at dl-open.c:639
#9  0x00007ffff79b9f26 in dlopen_doit (a=0x7fffffffa6b0) at dlopen.c:67
#10 0x00007ffff7de9176 in _dl_catch_error (
    objname=0x673270 <__interceptor_calloc::calloc_memory_for_dlsym+16>, 
    errstring=0x673278 <__interceptor_calloc::calloc_memory_for_dlsym+24>, 
    mallocedp=0x673268 <__interceptor_calloc::calloc_memory_for_dlsym+8>, 
    operate=0x7ffff79b9ec0 <dlopen_doit>, args=0x7fffffffa6b0)
    at dl-error.c:178
#11 0x00007ffff79ba52f in _dlerror_run (operate=0x7ffff79b9ec0 <dlopen_doit>, 
    args=0x7fffffffa6b0) at dlerror.c:164
#12 0x00007ffff79b9fc1 in __dlopen (file=<optimized out>, mode=<optimized out>)
    at dlopen.c:88
#13 0x0000000000431250 in GetLibHandle ()
    at xpcom/glue/standalone/nsXPCOMGlue.cpp:258
#14 ReadDependentCB ()
    at xpcom/glue/standalone/nsXPCOMGlue.cpp:305
#15 XPCOMGlueLoad ()
    at xpcom/glue/standalone/nsXPCOMGlue.cpp:446
---Type <return> to continue, or q <return> to quit---
#16 XPCOMGlueStartup ()
    at xpcom/glue/standalone/nsXPCOMGlue.cpp:507
#17 0x000000000042b6e4 in InitXPCOMGlue ()
    at browser/app/nsBrowserApp.cpp:492
#18 main ()
    at browser/app/nsBrowserApp.cpp:541

2. With old clang r176408, there is a startup exit with use of -silent command line flag. No crash stack.
Flags: needinfo?(inferno)
You need to log in before you can comment on or make changes to this bug.