SEGV happened in asan_allocate

50 views
Skip to first unread message

xian li

unread,
Feb 5, 2021, 3:54:43 AM2/5/21
to address-sanitizer
Hi,

I am using asan to detect our app's memory problems, but when run our app with asan,
the SEGV happened,  the backtrace is like the following
-----------------------------------------------------
(gdb) bt
#0  0x0000007fb72ce304 in __asan::Allocate (size=<optimized out>, 
    size@entry=67, alignment=<optimized out>, alignment@entry=0, 
    stack=stack@entry=0x7fab1fd650, 
    alloc_type=alloc_type@entry=__asan::FROM_NEW, 
    can_fill=can_fill@entry=true)
    at /home/user/Downloads/cross_compile_gcc/gcc-linara-5.4.0/libsanitizer/asan/asan_allocator2.cc:332
#1  0x0000007fb72ceecc in __asan::asan_memalign (alignment=alignment@entry=0, 
    size=size@entry=67, stack=stack@entry=0x7fab1fd650, 
    alloc_type=alloc_type@entry=__asan::FROM_NEW)
    at /home/user/Downloads/cross_compile_gcc/gcc-linara-5.4.0/libsanitizer/asan/asan_allocator2.cc:581
#2  0x0000007fb733f0e4 in operator new (size=67)
    at /home/user/Downloads/cross_compile_gcc/gcc-linara-5.4.0/libsanitizer/asan/asan_new_delete.cc:60
#3  0x0000007fb72379b4 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) () from /usr/lib64/libstdc++.so.6
#4  0x0000007fb7238e68 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long) ()
   from /usr/lib64/libstdc++.so.6
#5  0x00000000004a02bc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append (__str=..., this=<optimized out>)
---Type <return> to continue, or q <return> to quit---
    at ../../../../platform/linux/agl_common/include/c++/5.3.0/bits/basic_string.h:984
#6  std::operator+<char, std::char_traits<char>, std::allocator<char> > (
    __rhs=..., __lhs=...)
    at ../../../../platform/linux/agl_common/include/c++/5.3.0/bits/basic_string.h:4789
#7  ZmDvrTitle::getImg (this=this@entry=0x7fae713990, prop=..., bmpName=...)
    at ../../../../projects/product/node/dvr/zm_dvr_title.cpp:119
---------------------------------------------------------------
Any ideas about it? is it the problem of our app or problem of asan?
how can I know them? thanks in advance

xian li

unread,
Feb 21, 2021, 10:47:18 PM2/21/21
to address-...@googlegroups.com
maybe it is because of the way I compile my app using -lasan directly
during link process, after modification, there is no such errors any
more

xian li <lixian2...@gmail.com> 于2021年2月5日周五 下午4:54写道:
> --
> You received this message because you are subscribed to a topic in the Google Groups "address-sanitizer" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/address-sanitizer/7Puu1Nti6mU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to address-saniti...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/address-sanitizer/cca45a03-59d6-491f-98c6-6c4aa7837bc1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages