Skip to content

Instantly share code, notes, and snippets.

@rgilton
Created May 12, 2016 17:11
Show Gist options
  • Save rgilton/c0f6b6acb68f6b80a458a6b290345316 to your computer and use it in GitHub Desktop.
Save rgilton/c0f6b6acb68f6b80a458a6b290345316 to your computer and use it in GitHub Desktop.
[rob@zarniwoop tmp(master)]$ gdb ./test
GNU gdb (GDB) Fedora 7.10.1-31.fc23
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./test...done.
(gdb) b asan_rtl.cc:556
No source file named asan_rtl.cc.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (asan_rtl.cc:556) pending.
(gdb) r
Starting program: /home/rob/tmp/test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, __asan::AsanInitInternal () at ../../../../libsanitizer/asan/asan_rtl.cc:556
556 CHECK(!asan_init_is_running && "ASan init calls itself!");
(gdb) c
Continuing.
Breakpoint 1, __asan::AsanInitInternal () at ../../../../libsanitizer/asan/asan_rtl.cc:556
556 CHECK(!asan_init_is_running && "ASan init calls itself!");
(gdb) bt
#0 __asan::AsanInitInternal () at ../../../../libsanitizer/asan/asan_rtl.cc:556
#1 0x00007ffff6e8f4ca in __asan::Allocate(__sanitizer::uptr, __sanitizer::uptr, __sanitizer::BufferedStackTrace *, enum __asan::AllocType, bool) (size=size@entry=54,
alignment=alignment@entry=8, stack=stack@entry=0x7fffffffcb40, alloc_type=alloc_type@entry=__asan::FROM_MALLOC, can_fill=can_fill@entry=true)
at ../../../../libsanitizer/asan/asan_allocator2.cc:266
#2 0x00007ffff6e8fdf8 in __asan::asan_malloc (size=size@entry=54, stack=stack@entry=0x7fffffffcb40) at ../../../../libsanitizer/asan/asan_allocator2.cc:594
#3 0x00007ffff6f04948 in __interceptor_malloc (size=54) at ../../../../libsanitizer/asan/asan_malloc_linux.cc:39
#4 0x00007ffff7deb3c1 in _dl_signal_error (errcode=errcode@entry=0, objname=objname@entry=0x7ffff7ff7640 "/lib64/libasan.so.2",
occation=occation@entry=0x7ffff7df846e "symbol lookup error", errstring=errstring@entry=0x7fffffffd820 "undefined symbol: __isoc99_printf") at dl-error.c:90
#5 0x00007ffff7deb573 in _dl_signal_cerror (errcode=0, objname=0x7ffff7ff7640 "/lib64/libasan.so.2", occation=0x7ffff7df846e "symbol lookup error",
errstring=0x7fffffffd820 "undefined symbol: __isoc99_printf") at dl-error.c:155
#6 0x00007ffff7de6303 in _dl_lookup_symbol_x (undef_name=0x7ffff6f3f10b "__isoc99_printf", undef_map=<optimized out>, ref=0x7fffffffd998, symbol_scope=0x7ffff7ffe4d0,
version=<optimized out>, type_class=0, flags=0, skip_map=0x7ffff7ff7658) at dl-lookup.c:870
#7 0x00007ffff6be9161 in do_sym (handle=0xffffffffffffffff, name=0x7ffff6f3f10b "__isoc99_printf", who=<optimized out>, vers=vers@entry=0x0, flags=flags@entry=2) at dl-sym.c:161
#8 0x00007ffff6be955d in _dl_sym (handle=<optimized out>, name=<optimized out>, who=<optimized out>) at dl-sym.c:273
#9 0x00007ffff668b0f4 in dlsym_doit (a=a@entry=0x7fffffffdb90) at dlsym.c:50
#10 0x00007ffff7deb5f4 in _dl_catch_error (objname=0x7ffff73847d0 <__interceptor_calloc::calloc_memory_for_dlsym+16>,
errstring=0x7ffff73847d8 <__interceptor_calloc::calloc_memory_for_dlsym+24>, mallocedp=0x7ffff73847c8 <__interceptor_calloc::calloc_memory_for_dlsym+8>,
operate=0x7ffff668b0e0 <dlsym_doit>, args=0x7fffffffdb90) at dl-error.c:187
#11 0x00007ffff668b631 in _dlerror_run (operate=operate@entry=0x7ffff668b0e0 <dlsym_doit>, args=args@entry=0x7fffffffdb90) at dlerror.c:163
#12 0x00007ffff668b148 in __dlsym (handle=handle@entry=0xffffffffffffffff, name=name@entry=0x7ffff6f3f10b "__isoc99_printf") at dlsym.c:70
#13 0x00007ffff6f2544c in __interception::GetRealFunctionAddress (func_name=func_name@entry=0x7ffff6f3f10b "__isoc99_printf",
func_addr=func_addr@entry=0x7ffff73825c8 <__interception::real___isoc99_printf>, real=real@entry=140737336102432, wrapper=wrapper@entry=140737336102432)
at ../../../../libsanitizer/interception/interception_linux.cc:21
#14 0x00007ffff6efa53f in InitializeCommonInterceptors () at ../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4763
#15 __asan::InitializeAsanInterceptors () at ../../../../libsanitizer/asan/asan_interceptors.cc:734
#16 0x00007ffff6f0dc50 in __asan::AsanInitInternal () at ../../../../libsanitizer/asan/asan_rtl.cc:595
#17 0x00007ffff7deb8c2 in _dl_init (main_map=0x7ffff7ffe148, argc=1, argv=0x7fffffffdc98, env=0x7fffffffdca8) at dl-init.c:105
#18 0x00007ffff7ddccba in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#19 0x0000000000000001 in ?? ()
#20 0x00007fffffffdfe7 in ?? ()
---Type <return> to continue, or q <return> to quit---
#21 0x0000000000000000 in ?? ()
(gdb) n
555 SanitizerToolName = "AddressSanitizer";
(gdb)
556 CHECK(!asan_init_is_running && "ASan init calls itself!");
(gdb)
==21428==AddressSanitizer CHECK failed: ../../../../libsanitizer/asan/asan_rtl.cc:556 "((!asan_init_is_running && "ASan init calls itself!")) != (0)" (0x0, 0x0)
<empty stack>
[Inferior 1 (process 21428) exited with code 01]
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment