google / sanitizers

AddressSanitizer, ThreadSanitizer, MemorySanitizer
Other
11.55k stars 1.04k forks source link

ASAN not stopping debugger #1775

Open vadi2 opened 3 months ago

vadi2 commented 3 months ago

I've set both ASAN_OPTIONS and a breakpoint on __sanitizer::Die per instructions but GDB is not stopping whenever there is an issue. Why is that?

GDB: GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git OS: Ubuntu 24.04 LTS Laptop: Framework 16

vadi@framework:~/Programs/Mudlet/build/src$ echo $ASAN_OPTIONS
abort_on_error=1
vadi@framework:~/Programs/Mudlet/build/src$ gdb -q ./mudlet
Reading symbols from ./mudlet...
(gdb) break __sanitizer::Die
Function "__sanitizer::Die" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (__sanitizer::Die) pending.
(gdb) run
Starting program: /home/vadi/Programs/Mudlet/build/src/mudlet 
Downloading separate debug info for system-supplied DSO at 0x7ffff7fc3000
[Thread debugging using libthread_db enabled]                                                                                                    
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Downloading separate debug info for /lib/x86_64-linux-gnu/libcrypto.so.3
Downloading separate debug info for /lib/x86_64-linux-gnu/libsystemd.so.0                                                                        
Downloading separate debug info for /lib/x86_64-linux-gnu/libapparmor.so.1                                                                       
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""                                                                             
[New Thread 0x7ffff06006c0 (LWP 207174)]
Downloading separate debug info for /lib/x86_64-linux-gnu/libgtk-3.so.0
Downloading separate debug info for /lib/x86_64-linux-gnu/libgdk-3.so.0                                                                          
warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgdk-3.so.0                                                         
Downloading separate debug info for /lib/x86_64-linux-gnu/libgdk-3.so.0
[New Thread 0x7fffef0006c0 (LWP 207176)]                                                                                                         
[New Thread 0x7fffee6006c0 (LWP 207177)]
[New Thread 0x7fffedc006c0 (LWP 207178)]
[New Thread 0x7fffed2006c0 (LWP 207179)]
Could not find Discord library - searched in:
     "/usr/lib/x86_64-linux-gnu/qt6/plugins"
     "/home/vadi/Programs/Mudlet/build/src"
[Detaching after vfork from child process 207181]
mudlet::mudlet() INFO - 'fusion' has been detected as the style factory in use - no styling fixes applied.
Downloading separate debug info for /lib/x86_64-linux-gnu/libssl.so.3
cTelnet::encodingChanged("UTF-8") INFO - Installing a codec for OOB protocols that can handle: QList()                                           
Downloading separate debug info for /usr/local/lib/lua/5.1/rex_pcre.so
Downloading separate debug info for /usr/local/lib/lua/5.1/lua-utf8.so                                                                           
Downloading separate debug info for /usr/local/lib/lua/5.1/yajl.so                                                                               
[LOADING PROFILE]: "/home/vadi/.config/mudlet/profiles/Achaea/current/2024-08-03#10-32-41.xml"                                                   
/home/vadi/Programs/Mudlet/src/Tree.h:133:27: runtime error: downcast of address 0x55555cea85e0 which does not point to an object of type 'TTrigger'
0x55555cea85e0: note: object is of type 'Tree<TTrigger>'
 00 00 00 00  38 52 41 5b 55 55 00 00  60 83 09 5d 55 55 00 00  60 ec 8b 5d 55 55 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'Tree<TTrigger>'
/home/vadi/Programs/Mudlet/src/Tree.h:133:27: runtime error: downcast of address 0x55555d8c2090 which does not point to an object of type 'TTimer'
0x55555d8c2090: note: object is of type 'Tree<TTimer>'
 00 00 00 00  f8 4c 41 5b 55 55 00 00  c0 21 8c 5d 55 55 00 00  50 14 95 5d 55 55 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'Tree<TTimer>'
/home/vadi/Programs/Mudlet/src/Tree.h:133:27: runtime error: downcast of address 0x55555d7d7580 which does not point to an object of type 'TAlias'
0x55555d7d7580: note: object is of type 'Tree<TAlias>'
 00 00 00 00  e8 02 41 5b 55 55 00 00  e0 a8 78 5d 55 55 00 00  10 3f 95 5d 55 55 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'Tree<TAlias>'
/home/vadi/Programs/Mudlet/src/Tree.h:133:27: runtime error: downcast of address 0x55555d900400 which does not point to an object of type 'TScript'
0x55555d900400: note: object is of type 'Tree<TScript>'
 00 00 00 00  88 45 41 5b 55 55 00 00  d0 3e 91 5d 55 55 00 00  c0 28 7a 5d 55 55 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'Tree<TScript>'
TMainConsole::setSystemSpellDictionary("en_US") INFO - System Hunspell dictionary loaded for profile, it uses a "UTF-8" encoding...
TMainConsole::setProfileSpellDictionary() INFO - Preparing profile's own Hunspell dictionary...