dyninst / dyninst

DyninstAPI: Tools for binary instrumentation, analysis, and modification.
http://www.dyninst.org
GNU Lesser General Public License v2.1
733 stars 157 forks source link

Assert in Dyninst::SymtabAPI::DwarfWalker::parseEnumEntry() [clone .cold] () at /usr/include/c++/11/ext/new_allocator.h:89 #1017

Open woodard opened 3 years ago

woodard commented 3 years ago

Intention with dyninst 11 running repo1 on /usr/lib64/libbabeltrace-ctf.so.1.0.0 from libbabeltrace-1.5.8-6.fc34.x86_64

Describe the bug Starting program: /home/ben/Shared/Work/dwqual/repo1 /usr/lib64/libbabeltrace-ctf.so.1.0.0 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". terminate called after throwing an instance of 'std::bad_cast' what(): std::bad_cast

Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 49 return ret;

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49

1 0x00007ffff77718a4 in __GI_abort () at abort.c:79

2 0x00007ffff7b1ca46 in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95

3 0x00007ffff7b2828c in cxxabiv1::terminate (handler=) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48

4 0x00007ffff7b282f7 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:58

5 0x00007ffff7b28599 in cxxabiv1::cxa_throw (obj=, tinfo=0x7ffff7c8af38 , dest=0x7ffff7b26a00 <std::bad_cast::~bad_cast()>) at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:95

6 0x00007ffff7b1c4b9 in cxxabiv1::cxa_bad_cast () at ../../../../libstdc++-v3/libsupc++/eh_aux_runtime.cc:34

7 0x00007ffff7eb7f1f in Dyninst::SymtabAPI::DwarfWalker::parseEnumEntry() [clone .cold] () at /usr/include/c++/11/ext/new_allocator.h:89

8 0x00007ffff7f788d8 in Dyninst::SymtabAPI::DwarfWalker::parse_int (this=0x7fffffffc9e0, e=..., parseSib=true, dissociate_context=) at /home/ben/Shared/Work/dyninst/symtabAPI/src/dwarfWalker.C:417

9 0x00007ffff7f78961 in Dyninst::SymtabAPI::DwarfWalker::parse_int (this=0x7fffffffc9e0, e=..., parseSib=true, dissociate_context=) at /home/ben/Shared/Work/dyninst/symtabAPI/src/dwarfWalker.C:486

10 0x00007ffff7f78961 in Dyninst::SymtabAPI::DwarfWalker::parse_int (this=0x7fffffffc9e0, e=..., parseSib=true, dissociate_context=) at /home/ben/Shared/Work/dyninst/symtabAPI/src/dwarfWalker.C:486

11 0x00007ffff7f792bd in Dyninst::SymtabAPI::DwarfWalker::parseModule (this=0x7fffffffc9e0, moduleDIE=..., fixUnknownMod=@0x7fffffffc9a0: 0x519880) at /home/ben/Shared/Work/dyninst/symtabAPI/src/dwarfWalker.C:289

12 0x00007ffff7f79d44 in Dyninst::SymtabAPI::DwarfWalker::parse (this=this@entry=0x7fffffffd230) at /usr/include/c++/11/bits/stl_vector.h:1043

13 0x00007ffff7f26391 in Dyninst::SymtabAPI::Object::parseTypeInfo (this=0x4a9dd0) at /home/ben/Shared/Work/dyninst/symtabAPI/src/Object-elf.C:4532

14 0x00007ffff7ed2a59 in Dyninst::SymtabAPI::Symtab::parseTypes (this=0x49b960) at /home/ben/Shared/Work/dyninst/symtabAPI/src/Symtab.C:2055

15 0x00007ffff7ed2adc in Dyninst::SymtabAPI::Symtab::parseTypesNow (this=) at /home/ben/Shared/Work/dyninst/symtabAPI/src/Symtab.C:2864

16 0x00007ffff7ec44c8 in Dyninst::SymtabAPI::FunctionBase::getParams (this=this@entry=0x684fd0, params_=std::vector of length 0, capacity 0) at /home/ben/Shared/Work/dyninst/symtabAPI/src/Function.C:122

17 0x000000000040355b in main (argc=, argv=) at /home/ben/Shared/Work/dwqual/repo1.C:64

woodard commented 3 years ago

A similar one happens with /home/ben/Shared/Work/dwqual/repo1 /usr/lib64/libfreerdp2.so.2.2.0 from freerdp-libs-2.2.0-6.fc34.x86_64 but it is in

7 0x00007ffff7eb80c8 in Dyninst::SymtabAPI::DwarfWalker::parseMember() [clone .cold] () at /usr/include/c++/11/ext/new_allocator.h:89

rather than

7 0x00007ffff7eb7f1f in Dyninst::SymtabAPI::DwarfWalker::parseEnumEntry() [clone .cold] () at /usr/include/c++/11/ext/new_allocator.h:89

woodard commented 3 years ago

Variants of this seem to be the only asserts that I'm seeing:

$ grep -L "exited normally" *.out | xargs grep -h "#7" | sort | uniq -c 11 #7 0x00007ffff7eb7f1f in Dyninst::SymtabAPI::DwarfWalker::parseEnumEntry() [clone .cold] () at /usr/include/c++/11/ext/new_allocator.h:89 1 #7 0x00007ffff7eb7f77 in Dyninst::SymtabAPI::DwarfWalker::parseInheritance() [clone .cold] () at /usr/include/c++/11/ext/new_allocator.h:89 15 #7 0x00007ffff7eb80c8 in Dyninst::SymtabAPI::DwarfWalker::parseMember() [clone .cold] () at /usr/include/c++/11/ext/new_allocator.h:89 2 #7 0x00007ffff7eb8385 in Dyninst::SymtabAPI::DwarfWalker::addFuncToContainer(boost::shared_ptr) [clone .cold] () at /usr/include/c++/11/ext/new_allocator.h:89

All of these are from current Fedora 34 rpms. Here are a list of my failures and the rpms that they come from: /usr/lib64/libbabeltrace-ctf.so.1.0.0 libbabeltrace-1.5.8-6.fc34.x86_64 /usr/lib64/libdcerpc-samr.so.0.0.1 samba-libs-4.14.2-1.fc34.x86_64 /usr/lib64/libfreerdp2.so.2.2.0 freerdp-libs-2.2.0-6.fc34.x86_64 /usr/lib64/libgnutls-dane.so.0.4.1 gnutls-dane-3.7.1-2.fc34.x86_64 /usr/lib64/libgstnet-1.0.so.0.1804.0 gstreamer1-1.18.4-2.fc34.x86_64 /usr/lib64/libgstvideo-1.0.so.0.1804.0 gstreamer1-plugins-base-1.18.4-1.fc34.x86_64 /usr/lib64/libgvc.so.6.0.0 graphviz-2.44.0-17.fc34.x86_64 /usr/lib64/graphviz/libgvplugin_gdk.so.6.0.0 graphviz-2.44.0-17.fc34.x86_64 /usr/lib64/graphviz/libgvplugin_gs.so.6.0.0 graphviz-2.44.0-17.fc34.x86_64 /usr/lib64/graphviz/libgvplugin_lasi.so.6.0.0 graphviz-2.44.0-17.fc34.x86_64 /usr/lib64/graphviz/libgvplugin_rsvg.so.6.0.0 graphviz-2.44.0-17.fc34.x86_64 /usr/lib64/graphviz/libgvplugin_webp.so.6.0.0 graphviz-2.44.0-17.fc34.x86_64 /usr/lib64/graphviz/libgvplugin_xlib.so.6.0.0 graphviz-2.44.0-17.fc34.x86_64 /usr/lib64/libhgfs.so.0.0.0 open-vm-tools-11.2.5-6.fc34.x86_64 /usr/lib64/libicudata.so.67.1 libicu-67.1-6.fc34.x86_64 /usr/lib64/pipewire-0.3/jack/libjacknet.so.0.325.0 pipewire-jack-audio-connection-kit-0.3.25-1.fc34.x86_64 /usr/lib64/liblab_gamut.so.1.0.0 graphviz-2.44.0-17.fc34.x86_64 /usr/lib64/libmbim-glib.so.4.5.0 libmbim-1.24.4-2.fc34.x86_64 /usr/lib64/mutter-8/libmutter-cogl-pango-8.so.0.0.0 mutter-40.0-5.fc34.x86_64 /usr/lib64/libnetcdf.so.15.2.1 netcdf-4.7.3-6.fc34.x86_64 /usr/lib64/libnfs.so.13.0.0 libnfs-4.0.0-4.fc34.x86_64 /usr/lib64/libns.so.1607.0.0 bind-libs-9.16.11-5.fc34.x86_64 /usr/lib64/libnss_systemd.so.2 systemd-libs-248-2.fc34.x86_64 /usr/lib64/libogdi.so.4.1 ogdi-4.1.0-5.fc34.x86_64 /usr/lib64/libopenh264.so.2.1.1 openh264-2.1.1-2.fc34.x86_64 /usr/lib64/libOSMesa.so.8.0.0 mesa-libOSMesa-21.0.2-1.fc34.x86_64 /usr/lib64/libpcp_import.so.1 pcp-libs-5.2.5-2.fc34.x86_64 /usr/lib64/libQtGui.so.4.8.7 qt-x11-4.8.7-60.fc34.x86_64 /usr/lib64/librados_tp.so.2.0.0 librados2-16.2.0-2.fc34.x86_64 /usr/lib64/librbd_tp.so.1.0.0 librbd1-16.2.0-2.fc34.x86_64 /usr/lib64/libreport-gtk.so.1.0.0 libreport-gtk-2.14.0-17.fc34.x86_64 /usr/lib64/sane/libsane-dell1600n_net.so.1.0.32 sane-backends-drivers-scanners-1.0.32-4.fc34.x86_64 /usr/lib64/sane/libsane-epson.so.1.0.32 sane-backends-drivers-scanners-1.0.32-4.fc34.x86_64 /usr/lib64/libSvtAv1Dec.so.0.8.6 svt-av1-libs-0.8.6-4.fc34.x86_64 /usr/lib64/libSvtAv1Enc.so.0.8.6 svt-av1-libs-0.8.6-4.fc34.x86_64 /usr/lib64/libtss2-fapi.so.1.0.0 tpm2-tss-3.0.3-2.fc34.x86_64 /usr/lib64/libv4lconvert.so.0.0.0 libv4l-1.20.0-3.fc34.x86_64 /usr/lib64/libvirt.so.0.7000.0 libvirt-libs-7.0.0-4.fc34.x86_64 /usr/lib64/libvtkImagingHybrid.so.9.0.1 vtk-9.0.1-3.fc34.x86_64 /usr/lib64/libvtkIOGeometry.so.9.0.1 vtk-9.0.1-3.fc34.x86_64 /usr/lib64/libwebkit2gtk-4.0.so.37.53.1 webkit2gtk3-2.32.0-2.fc34.x86_64

This is the one which crashes in parseIneritance. /usr/lib64/dyninst/libparseAPI.so.10.2.1 dyninst-10.2.1-6.fc34.x86_64

These two assert in addFuncToContainer /usr/lib64/libQt5Core.so.5.15.2 qt5-qtbase-5.15.2-15.fc34.x86_64 /usr/lib64/libTKVRML.so.7.5.0 opencascade-modeling-7.5.0-3.fc34.x86_64

sashanicolas commented 3 years ago

@woodard is this gcc 11 too like issue #1018 and #1019? And all on fedora34?

woodard commented 3 years ago

Sorry I missed seeing this until now.

Yes with fedora34