https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97461
--- Comment #2 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Original firefox lockup is slightly more complicated: malloc() call happens in
a constructor of external library (at _gpg_err_init()).
(gdb) bt
#0 __lll_lock_wait (futex=0x5591defd9720 <gInitLock>, private=0) at
lowlevellock.c:52
#1 0x00007f6e72d23305 in __GI___pthread_mutex_lock (mutex=0x5591defd9720
<gInitLock>) at ../nptl/pthread_mutex_lock.c:135
#2 0x00005591deeb60a1 in malloc_init_hard() ()
#3 0x00005591deebf75e in calloc ()
#4 0x00005591defa70df in allocate_gcov_kvp () at
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/libgcc/libgcov.h:441
#5 gcov_topn_add_value (count=1, use_atomic=1, increment_total=1, value=4096,
counters=0x5591df011520 <__gcov3._ZL16malloc_init_hardv>)
at
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/libgcc/libgcov.h:489
#6 __gcov_topn_values_profiler_body (use_atomic=1, value=4096,
counters=0x5591df011520 <__gcov3._ZL16malloc_init_hardv>)
at
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/libgcc/libgcov-profiler.c:103
#7 __gcov_topn_values_profiler_atomic (counters=0x5591df011520
<__gcov3._ZL16malloc_init_hardv>, value=4096)
at
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/libgcc/libgcov-profiler.c:128
#8 0x00005591deeb6121 in malloc_init_hard() ()
#9 0x00005591deec052e in malloc ()
#10 0x00007f6e5c5ecddf in set_binding_values (domainname=0x7f6e58451245
"libgpg-error", dirnamep=0x7fffd54f39c8, codesetp=0x0) at bindtextdom.c:202
#11 0x00007f6e5c5ed071 in set_binding_values (codesetp=0x0,
dirnamep=0x7fffd54f39c8, domainname=<optimized out>) at bindtextdom.c:82
#12 __bindtextdomain (domainname=<optimized out>, dirname=<optimized out>) at
bindtextdom.c:320
#13 0x00007f6e5843cbc7 in _gpg_err_init () at /usr/lib64/libgpg-error.so.0
#14 0x00007f6e72d94cfe in call_init (l=<optimized out>, argc=argc@entry=3,
argv=argv@entry=0x7fffd54f3a68, env=env@entry=0x7fffd54f3a88) at dl-init.c:74
#15 0x00007f6e72d94de0 in call_init (env=0x7fffd54f3a88, argv=0x7fffd54f3a68,
argc=3, l=<optimized out>) at dl-init.c:37
#16 _dl_init (main_map=0x7f6e72db11a0, argc=3, argv=0x7fffd54f3a68,
env=0x7fffd54f3a88) at dl-init.c:121
#17 0x00007f6e72d8608a in _dl_start_user () at /lib64/ld-linux-x86-64.so.2
#18 0x0000000000000003 in ()
#19 0x00007fffd54f4a83 in ()
#20 0x00007fffd54f4a9c in ()
#21 0x00007fffd54f4b15 in ()
#22 0x0000000000000000 in ()