https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93599
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2020-02-07 Ever confirmed|0 |1 --- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- valgrind --tool=helgrind yields ==17870== Thread #1: lock order "0x5BB51F8 before 0x5BB5300" violated ==17870== ==17870== Observed (incorrect) order is: acquisition of lock at 0x5BB5300 ==17870== at 0x4C357CB: pthread_cond_wait_WRK (hg_intercepts.c:1209) ==17870== by 0x4C368D0: pthread_cond_wait@* (hg_intercepts.c:1230) ==17870== by 0x4169D9: __gthread_cond_wait (gthr-default.h:865) ==17870== by 0x4169D9: _gfortrani_async_wait (async.c:467) ==17870== by 0x404B20: _gfortran_st_rewind (file_pos.c:440) ==17870== by 0x402974: MAIN__ (in /home/ig25/Krempel/Rewind/a.out) ==17870== by 0x402A79: main (in /home/ig25/Krempel/Rewind/a.out) ==17870== ==17870== followed by a later acquisition of lock at 0x5BB51F8 ==17870== at 0x4C329CC: mutex_lock_WRK (hg_intercepts.c:909) ==17870== by 0x4C368A4: pthread_mutex_lock (hg_intercepts.c:925) ==17870== by 0x4169AC: __gthread_mutex_lock (gthr-default.h:749) ==17870== by 0x4169AC: _gfortrani_async_wait (async.c:467) ==17870== by 0x404B20: _gfortran_st_rewind (file_pos.c:440) ==17870== by 0x402974: MAIN__ (in /home/ig25/Krempel/Rewind/a.out) ==17870== by 0x402A79: main (in /home/ig25/Krempel/Rewind/a.out) ==17870== ==17870== Required order was established by acquisition of lock at 0x5BB51F8 ==17870== at 0x4C329CC: mutex_lock_WRK (hg_intercepts.c:909) ==17870== by 0x4C368A4: pthread_mutex_lock (hg_intercepts.c:925) ==17870== by 0x41651F: __gthread_mutex_lock (gthr-default.h:749) ==17870== by 0x41651F: _gfortrani_enqueue_data_transfer_init (async.c:369) ==17870== by 0x40B87C: data_transfer_init (transfer.c:3246) ==17870== by 0x402828: MAIN__ (in /home/ig25/Krempel/Rewind/a.out) ==17870== by 0x402A79: main (in /home/ig25/Krempel/Rewind/a.out) ==17870== ==17870== followed by a later acquisition of lock at 0x5BB5300 ==17870== at 0x4C329CC: mutex_lock_WRK (hg_intercepts.c:909) ==17870== by 0x4C368A4: pthread_mutex_lock (hg_intercepts.c:925) ==17870== by 0x41654E: __gthread_mutex_lock (gthr-default.h:749) ==17870== by 0x41654E: _gfortrani_enqueue_data_transfer_init (async.c:376) ==17870== by 0x40B87C: data_transfer_init (transfer.c:3246) ==17870== by 0x402828: MAIN__ (in /home/ig25/Krempel/Rewind/a.out) ==17870== by 0x402A79: main (in /home/ig25/Krempel/Rewind/a.out) ==17870== ==17870== Lock at 0x5BB51F8 was first observed ==17870== at 0x4C3680D: pthread_mutex_init (hg_intercepts.c:787) ==17870== by 0x415FB3: __gthread_mutex_init_function (gthr-default.h:733) ==17870== by 0x415FB3: _gfortrani_init_async_unit (async.c:247) ==17870== by 0x4054FE: _gfortrani_new_unit (open.c:666) ==17870== by 0x405CEC: already_open (open.c:720) ==17870== by 0x405CEC: _gfortran_st_open (open.c:897) ==17870== by 0x4027DA: MAIN__ (in /home/ig25/Krempel/Rewind/a.out) ==17870== by 0x402A79: main (in /home/ig25/Krempel/Rewind/a.out) ==17870== Address 0x5bb51f8 is 40 bytes inside a block of size 456 alloc'd ==17870== at 0x4C2F831: malloc (vg_replace_malloc.c:309) ==17870== by 0x418304: _gfortrani_xmalloc (memory.c:38) ==17870== by 0x415F4E: _gfortrani_init_async_unit (async.c:243) ==17870== by 0x4054FE: _gfortrani_new_unit (open.c:666) ==17870== by 0x405CEC: already_open (open.c:720) ==17870== by 0x405CEC: _gfortran_st_open (open.c:897) ==17870== by 0x4027DA: MAIN__ (in /home/ig25/Krempel/Rewind/a.out) ==17870== by 0x402A79: main (in /home/ig25/Krempel/Rewind/a.out) ==17870== Block was alloc'd by thread #1 ==17870== So, I think we can confirm this.