GreatPi
GreatPi

Reputation: 21

How can I control ASAN not to catch c++ function __cxa_throw

When I run my code with libasan.so, it will stuck in the lib. And the version is 9.5.0.There is a part of backtrace.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
0x0000ffff8044f044 in ?? () from /lib/aarch64-linux-gnu/libc.so.6
(gdb) bt
#0  0x0000ffff8044f044 in ?? () from /lib/aarch64-linux-gnu/libc.so.6
#1  0x0000ffff80644b70 in __asan_handle_no_return () at ../../../../src/libsanitizer/asan/asan_rtl.cc:569
#2  0x0000ffff805876c4 in __interceptor___cxa_throw (a=0xffff78e2d380, b=0xffff6f89e2a8 <typeinfo for std::system_error>, c=0xffff6f792ba0 <std::system_error::~system_error()>)
    at ../../../../src/libsanitizer/asan/asan_interceptors.cc:328
#3  0x0000ffff68aee940 in void asio::detail::throw_exception<std::system_error>(std::system_error const&) ()
   from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#4  0x0000ffff68d033c0 in asio::detail::do_throw_error(std::error_code const&, char const*) [clone .isra.0] ()
   from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#5  0x0000ffff68d07050 in eprosima::fastdds::rtps::UDPv4Transport::OpenAndBindInputSocket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short, bool) () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#6  0x0000ffff68d1c16c in eprosima::fastdds::rtps::UDPTransportInterface::CreateInputChannelResource(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::rtps::Locator_t const&, bool, unsigned int, eprosima::fastdds::rtps::TransportReceiverInterface*) ()
   from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11

I do not get the resolution, but I throught if i can avoid asan catch c++ throw. I learn it can set

export ASAN_OPTIONS=intercept_cxx_exceptions=false

in run time When I asked chaptapt.But it doesn`t work. And there is not this keyword in asan source code when i searthing.

Upvotes: 1

Views: 59

Answers (0)

Related Questions