SideChannelMarvels / Tracer

Set of Dynamic Binary Instrumentation and visualization tools for execution traces.
GNU General Public License v3.0
297 stars 70 forks source link

Tracegraph crashing with segmentation fault #4

Closed edermi closed 7 years ago

edermi commented 8 years ago

Tragegraph is crashing when opening specific sqlite files:

Program received signal SIGSEGV, Segmentation fault.
0x000000000040d193 in ?? ()
(gdb) where
#0  0x000000000040d193 in ?? ()
#1  0x000000000040d1b3 in ?? ()
#2  0x00007ffff6755eda in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff743bd17 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4  0x00007ffff73fd12c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x00007ffff7402600 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ffff6725dcb in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ffff6727dc3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007ffff677dda3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff4cacc5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007ffff4cacf48 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff4cacffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff677e1b7 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff6723512 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff672b15c in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00000000004068ab in ?? ()
#16 0x00007ffff53e9b45 in __libc_start_main (main=0x406850, argc=1, argv=0x7fffffffe608, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe5f8) at libc-start.c:287
#17 0x0000000000406919 in ?? ()

Unfortunately the trace is too big to upload it (250MB), if you can't reproduce it I'll try to find a trace < 10MB or another way to reproduce.

edermi commented 8 years ago

The attached archive contains a database (I can't upload the database itself) of a trace generated by TracerPIN when attaching to a Java process with an address filter enabled. Tracegraph crashes on my machine when loading this trace. database.zip

doegox commented 8 years ago

second one provokes the crash because it doesn't contain any instructions. I'm not sure it's related to the initial problem. Anyway tracegraph should be more robust on parsing sqlite (or whatever file we throw at it).

haxelion commented 7 years ago

Sorry for fixing this so late even though it was an easy fix. But the fix is in commit ad596fe66babbb9f296348b3f42263d3630c52a9 ;-)