Ofunniku / dwarftherapist

Automatically exported from code.google.com/p/dwarftherapist
Other
0 stars 0 forks source link

[64 bit Linux] "locate squads vector" causes DT to allocate 2 gigs of memory and crash in DFInstanceLinux::read_raw #416

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I tried following the guide at 
http://code.google.com/p/dwarftherapist/wiki/MappingNewVersions to map the new 
0.34.09 DF. After hitting "locate squads vector" button DT allocated 2GB of 
memory and segfaulted in DFInstanceLinux::read_raw(unsigned int const&, int, 
QByteArray&).

Full backtrace: 
#0  __memmove_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:153
#1  0x00007f2c947e35f6 in detach (this=<optimized out>) at 
/usr/include/bits/string3.h:58
#2  detach (this=0x7f2c7fc79ba0) at tools/qbytearray.cpp:1836
#3  QByteArray::replace (this=0x7f2c7fc79ba0, pos=-2147481920, len=<optimized 
out>, after=...) at tools/qbytearray.cpp:1839
#4  0x000000000042436e in DFInstanceLinux::read_raw(unsigned int const&, int, 
QByteArray&) ()
#5  0x00000000004b30d5 in DFInstance::read_int(unsigned int const&) ()
#6  0x0000000000510868 in SquadVectorSearchJob::go() ()
#7  0x00007f2c948f7956 in QObject::event (this=0x7f2c7400b6a0, e=<optimized 
out>) at kernel/qobject.cpp:1195
#8  0x00007f2c9515c314 in QApplicationPrivate::notify_helper (this=0x23901e0, 
receiver=0x7f2c7400b6a0, e=0x7f2c74062b20) at kernel/qapplication.cpp:4554
#9  0x00007f2c95160f0f in QApplication::notify (this=<optimized out>, 
receiver=0x7f2c7400b6a0, e=0x7f2c74062b20) at kernel/qapplication.cpp:4415
#10 0x00007f2c948dea0c in QCoreApplication::notifyInternal 
(this=0x7fffbceab3c0, receiver=0x7f2c7400b6a0, event=0x7f2c74062b20) at 
kernel/qcoreapplication.cpp:876
#11 0x00007f2c948e22aa in sendEvent (event=0x7f2c74062b20, 
receiver=0x7f2c7400b6a0) at ../../src/corelib/kernel/qcoreapplication.h:231
#12 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, 
data=0x2dcf9c0) at kernel/qcoreapplication.cpp:1500
#13 0x00007f2c9490d4a3 in sendPostedEvents () at 
../../src/corelib/kernel/qcoreapplication.h:236
#14 postEventSourceDispatch (s=<optimized out>) at 
kernel/qeventdispatcher_glib.cpp:279
#15 0x00007f2c9407b593 in g_main_dispatch (context=0x7f2c74039e20) at 
gmain.c:2539
#16 g_main_context_dispatch (context=0x7f2c74039e20) at gmain.c:3075
#17 0x00007f2c9407b8e0 in g_main_context_iterate (dispatch=1, block=<optimized 
out>, context=0x7f2c74039e20, self=<optimized out>) at gmain.c:3146
#18 g_main_context_iterate (context=0x7f2c74039e20, block=<optimized out>, 
dispatch=1, self=<optimized out>) at gmain.c:3083
#19 0x00007f2c9407b9a4 in g_main_context_iteration (context=0x7f2c74039e20, 
may_block=1) at gmain.c:3207
#20 0x00007f2c9490d8cf in QEventDispatcherGlib::processEvents 
(this=0x7f2c740521c0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#21 0x00007f2c948dd7f2 in QEventLoop::processEvents (this=<optimized out>, 
flags=...) at kernel/qeventloop.cpp:149
#22 0x00007f2c948dda47 in QEventLoop::exec (this=0x7f2c7fc7ad20, flags=...) at 
kernel/qeventloop.cpp:204
#23 0x00007f2c947dcfa7 in QThread::exec (this=<optimized out>) at 
thread/qthread.cpp:501
#24 0x00000000004f8d03 in ScannerThread::run() ()
#25 0x00007f2c947dffcb in QThreadPrivate::start (arg=0x2d5d750) at 
thread/qthread_unix.cpp:298
#26 0x00007f2c93e1bd96 in start_thread (arg=0x7f2c7fc7b700) at 
pthread_create.c:305
#27 0x00007f2c93348a1d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Original issue reported on code.google.com by Yabo...@gmail.com on 17 May 2012 at 5:15

GoogleCodeExporter commented 9 years ago
I did some debugging and so far figured out that in the foreach loop at 
squadvectorsearchjob.h:70 one of the addresses returned by 
m_df->enumerate_vector(addr)is 0. Maybe I'll dig further into that later.

Original comment by Yabo...@gmail.com on 17 May 2012 at 5:37