https://bugs.kde.org/show_bug.cgi?id=378765

--- Comment #2 from Milian Wolff <m...@milianw.de> ---
Git commit 3e7405e6b83ea79bfaa7a1135d2cede2021394ae by Milian Wolff.
Committed on 24/09/2021 at 14:35.
Pushed by mwolff into branch 'master'.

Remove call to __libc_freeres and use builtin suppressions instead

Calling __libc_freeres is dangerous when we are not the last library
that gets its cleanup handler called. Sadly, there is no way to make
us reliably get into that last spot, see also:

https://sourceware.org/bugzilla/show_bug.cgi?id=28248

If we call __libc_freeres we might trigger cleanup of plugins too
early, which can then result in runtime crashes on exit:

```
(gdb) bt
#0  0x00007fffe9c4d340 in ?? ()
#1  0x00007ffff06033ac in ?? () from
/usr/lib/qt/plugins/kf5/sonnet/sonnet_aspell.so
#2  0x00007ffff66c7ba2 in ?? () from /usr/lib/libQt5Core.so.5
#3  0x00007ffff66cbef5 in ?? () from /usr/lib/libQt5Core.so.5
#4  0x00007ffff66c9319 in ?? () from /usr/lib/libQt5Core.so.5
#5  0x00007ffff6076a8e in __cxa_finalize () from /usr/lib/libc.so.6
#6  0x00007ffff64ca478 in ?? () from /usr/lib/libQt5Core.so.5
#7  0x00007fffffffc730 in ?? ()
#8  0x00007ffff7fdd1a4 in _dl_fini () from /lib64/ld-linux-x86-64.so.2
```

Instead, we now ship with a (small for now, patches welcome!) list
of builtin suppressions which the user can disable if desired.

M  +5    -1    src/analyze/accumulatedtracedata.cpp
M  +1    -0    src/analyze/filterparameters.h
M  +7    -0    src/analyze/gui/gui.cpp
M  +15   -0    src/analyze/gui/mainwindow.cpp
M  +2    -0    src/analyze/gui/mainwindow.h
M  +4    -0    src/analyze/print/heaptrack_print.cpp
M  +17   -0    src/analyze/suppressions.cpp
M  +2    -0    src/analyze/suppressions.h
M  +0    -7    src/track/libheaptrack.cpp

https://invent.kde.org/sdk/heaptrack/commit/3e7405e6b83ea79bfaa7a1135d2cede2021394ae

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to