Skip to content

Instantly share code, notes, and snippets.

@jpcima
Created December 30, 2018 18:08
Show Gist options
  • Select an option

  • Save jpcima/fe48c13ffde951e6e189842f2906ec43 to your computer and use it in GitHub Desktop.

Select an option

Save jpcima/fe48c13ffde951e6e189842f2906ec43 to your computer and use it in GitHub Desktop.
=================================================================
==20954==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60600033f318 at pc 0x562fdb0c5cfa bp 0x7ffcbaedf630 sp 0x7ffcbaedf620
READ of size 8 at 0x60600033f318 thread T0
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
surtie grain::updateparams, pitch =1
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
surtie grain::updateparams, pitch =1
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
surtie grain::updateparams, pitch =1
#0 0x562fdb0c5cf9 in Cloud::removeGrain() /home/jpc/Documents/Projects/Frontieres/sources/model/Cloud.cpp:397
#1 0x562fdb0c5cf9 in Cloud::removeGrain() /home/jpc/Documents/Projects/Frontieres/sources/model/Cloud.cpp:386
#2 0x562fdb0cb99a in Cloud::setNumGrains(unsigned int) /home/jpc/Documents/Projects/Frontieres/sources/model/Cloud.cpp:622
entree grain::setpitch, pitch =0
entree grain::setpitch, queuedPitch =1
surtie grain::updateparams, pitch =1
#3 0x562fdb129d70 in CloudDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jpc/Documents/Projects/Frontieres/build/Frontieres_autogen/T6ODFPLQBG/moc_CloudDialog.cpp:258
#4 0x562fdb129d70 in CloudDialog::qt_metacall(QMetaObject::Call, int, void**) /home/jpc/Documents/Projects/Frontieres/build/Frontieres_autogen/T6ODFPLQBG/moc_CloudDialog.cpp:346
#5 0x7fa930cdf35c in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib/libQt5Core.so.5+0x2a535c)
#6 0x7fa93181ba90 in QDoubleSpinBox::valueChanged(double) (/usr/lib/libQt5Widgets.so.5+0x2f6a90)
#7 0x7fa93181bd04 (/usr/lib/libQt5Widgets.so.5+0x2f6d04)
#8 0x7fa931818d20 (/usr/lib/libQt5Widgets.so.5+0x2f3d20)
#9 0x7fa93181d590 in QDoubleSpinBox::setValue(double) (/usr/lib/libQt5Widgets.so.5+0x2f8590)
#10 0x562fdb129d70 in CloudDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jpc/Documents/Projects/Frontieres/build/Frontieres_autogen/T6ODFPLQBG/moc_CloudDialog.cpp:258
#11 0x562fdb129d70 in CloudDialog::qt_metacall(QMetaObject::Call, int, void**) /home/jpc/Documents/Projects/Frontieres/build/Frontieres_autogen/T6ODFPLQBG/moc_CloudDialog.cpp:346
#12 0x7fa930cdf35c in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib/libQt5Core.so.5+0x2a535c)
#13 0x7fa93176c63e in QAbstractSlider::valueChanged(int) (/usr/lib/libQt5Widgets.so.5+0x24763e)
#14 0x7fa93176cca9 in QAbstractSlider::setValue(int) (/usr/lib/libQt5Widgets.so.5+0x247ca9)
#15 0x7fa93176d78e (/usr/lib/libQt5Widgets.so.5+0x24878e)
#16 0x7fa93176d914 in QAbstractSlider::wheelEvent(QWheelEvent*) (/usr/lib/libQt5Widgets.so.5+0x248914)
#17 0x7fa9316bd9d7 in QWidget::event(QEvent*) (/usr/lib/libQt5Widgets.so.5+0x1989d7)
#18 0x7fa93167ce33 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x157e33)
#19 0x7fa9316862a9 in QApplication::notify(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x1612a9)
#20 0x7fa930cb48f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x27a8f8)
#21 0x7fa9316da373 (/usr/lib/libQt5Widgets.so.5+0x1b5373)
#22 0x7fa9316dbcba (/usr/lib/libQt5Widgets.so.5+0x1b6cba)
#23 0x7fa93167ce33 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x157e33)
#24 0x7fa931684670 in QApplication::notify(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x15f670)
#25 0x7fa930cb48f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x27a8f8)
#26 0x7fa931082ae8 in QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent*) (/usr/lib/libQt5Gui.so.5+0x119ae8)
#27 0x7fa931087e15 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (/usr/lib/libQt5Gui.so.5+0x11ee15)
#28 0x7fa93106175b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Gui.so.5+0xf875b)
#29 0x7fa92453a99b (/usr/lib/libQt5XcbQpa.so.5+0x6c99b)
#30 0x7fa92eceda2e in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x6ba2e)
#31 0x7fa92ecef5e8 (/usr/lib/libglib-2.0.so.0+0x6d5e8)
#32 0x7fa92ecef62d in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x6d62d)
#33 0x7fa930d0a5a8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2d05a8)
#34 0x7fa930cb358b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x27958b)
#35 0x7fa930cbb895 in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x281895)
#36 0x562fdb020f47 in main /home/jpc/Documents/Projects/Frontieres/sources/Frontieres.cpp:1000
#37 0x7fa93056c222 in __libc_start_main (/usr/lib/libc.so.6+0x24222)
#38 0x562fdb02470d in _start (/home/jpc/Documents/Projects/Frontieres/build/Frontieres+0x5270d)
0x60600033f318 is located 8 bytes to the left of 64-byte region [0x60600033f320,0x60600033f360)
allocated by thread T0 here:
#0 0x7fa932425d29 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:90
#1 0x562fdb0ceb17 in __gnu_cxx::new_allocator<Grain*>::allocate(unsigned long, void const*) /usr/include/c++/8.2.1/ext/new_allocator.h:111
#2 0x562fdb0ceb17 in std::allocator_traits<std::allocator<Grain*> >::allocate(std::allocator<Grain*>&, unsigned long) /usr/include/c++/8.2.1/bits/alloc_traits.h:436
#3 0x562fdb0ceb17 in std::_Vector_base<Grain*, std::allocator<Grain*> >::_M_allocate(unsigned long) /usr/include/c++/8.2.1/bits/stl_vector.h:296
#4 0x562fdb0ceb17 in void std::vector<Grain*, std::allocator<Grain*> >::_M_realloc_insert<Grain*>(__gnu_cxx::__normal_iterator<Grain**, std::vector<Grain*, std::allocator<Grain*> > >, Grain*&&) /usr/include/c++/8.2.1/bits/vector.tcc:427
#5 0x7ffcbaeded5f ([stack]+0x1bd5f)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/jpc/Documents/Projects/Frontieres/sources/model/Cloud.cpp:397 in Cloud::removeGrain()
Shadow bytes around the buggy address:
0x0c0c8005fe10: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
0x0c0c8005fe20: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fd
0x0c0c8005fe30: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa
0x0c0c8005fe40: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
0x0c0c8005fe50: 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 00 fa
=>0x0c0c8005fe60: fa fa fa[fa]00 00 00 00 00 00 00 00 fa fa fa fa
0x0c0c8005fe70: 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 00 00
0x0c0c8005fe80: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 fa
0x0c0c8005fe90: fa fa fa fa 00 00 00 00 00 00 00 00 fa fa fa fa
0x0c0c8005fea0: 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 00 00
0x0c0c8005feb0: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==20954==ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment