asynclogger destructor is missing a null-check for somewhere
Categories
(Core :: Audio/Video, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: freddy, Assigned: padenot)
Details
Attachments
(1 file)
Starting firefox with the -app
command line switch but not further switches causes it to exit (See https://searchfox.org/mozilla-central/rev/d7537a9cd2974efa45141d974e5fc7c727f1a78f/browser/app/nsBrowserApp.cpp#158)
The destructor of AsyncLogger then tests whether it is enabled (obviously isn't) and then crashes.
Steps To Reproduce:
Run ./firefox -app
Backtrace:
(gdb) bt
#0 0x00007ffff7f9b8f0 in __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67
#1 0x000055555570260b in mutexLock () at /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:125
#2 0x000055555570260b in lock() () at /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:149
#3 0x00007fffdd77c026 in Lock () at /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:66
#4 0x00007fffdd77c026 in BaseAutoLock () at /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:165
#5 0x00007fffdd77c026 in CreateOrGetModule() () at /builds/worker/workspace/build/src/xpcom/base/Logging.cpp:368
#6 0x00007fffe451b3f6 in operator mozilla::LogModule* () at /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Logging.h:182
#7 0x00007fffe451b3f6 in Enabled () at /builds/worker/workspace/build/src/dom/media/AsyncLogger.h:223
#8 0x00007fffe451b3f6 in ~AsyncLogger() () at /builds/worker/workspace/build/src/dom/media/AsyncLogger.h:187
#9 0x00007ffff7a8f2ac in __run_exit_handlers (status=255, listp=0x7ffff7c2c718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#10 0x00007ffff7a8f3da in __GI_exit (status=<optimized out>) at exit.c:139
#11 0x00007ffff7a6eb72 in __libc_start_main (main=0x555555645030 <main()>, argc=2, argv=0x7fffffffde58, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde48)
at ../csu/libc-start.c:342
#12 0x000055555559ad99 in _start ()
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
It does not achieve anything and crashes if the log module manager hasn't been
initialized.
![]() |
||
Comment 4•6 years ago
|
||
bugherder |
Description
•