Address sanitizer trigger deadley signal for clang-14.0.6 built application

Dear members,

I passed “-fsanitize= address” to clang-14.0.6 and built an application and tried to launch it but it failed with the below error.

ASAN_OPTIONS=‘stack_trace_format=“[frame=%n, function=%f, location=%S]”’ proxy

AddressSanitizer: nested bug in the same thread, aborting.
Tried to gdb it but it failed with SIGSEGV immediately.
(gdb) r
Starting program: /bin/proxy
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib64/”.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f090f3 in ?? () from /lib64/

it seems address sanitizer is not initialized completely and prior it itself, application specific library trying to do address validation check for one of it’s thread memory allocation is causing this crash?
I am using glibc-2.35 and clang-14.0.6 compiler to build the application.
Seems it requires asan to initialize address sanitizer quickly prior to it’s use ? any specific patch introduced in latest compiler-rt package to address this issue? any insights plesae let me know?

Dear members,
in continuation to previous comment, i noticed above crash is not observed with clang-14.06 compiled same application that includes glibc-2.31 version.
From backtrace of crashed application, call stack shows crash in jemalloc api.
gdb) bt
#0 0x00007ffff7f090f3 in ?? () from /lib64/
#1 0x00007ffff7f097d8 in ?? () from /lib64/
#2 0x00007ffff7f0af69 in ?? () from /lib64/
#3 0x00007ffff7eaf7ca in sdallocx () from /lib64/
#4 0x00007ffff2fc0677 in std::__new_allocator<std::__detail::_State >::deallocate(std::__detail::_State, unsigned long) () from /lib64/
#5 0x00007ffff2fbb41e in std::allocator_traits<std::allocator<std::__detail::_State > >::deallocate(std::allocator<std::__detail::_State >&, std::__detail::_State
, unsigned long) ()
from /lib64/
#6 0x00007ffff2fb7b1e in std::_Vector_base<std::__detail::_State, std::allocator<std::__detail::_State > >::_M_deallocate(std::__detail::_State, unsigned long) () from /lib64/
#7 0x00007ffff2fb48bb in void std::vector<std::__detail::_State, std::allocator<std::__detail::_State > >::_M_realloc_insert<std::__detail::_State >(__gnu_cxx::__normal_iterator<std::__detail::_State
, std::vector<std::__detail::_State, std::allocator<std::__detail::_State > > >, std::__detail::_State&&) () from /lib64/
#8 0x00007ffff2fb22dc in std::__detail::_State& std::vector<std::__detail::_State, std::allocator<std::__detail::_State > >::emplace_back<std::__detail::_State >(std::__detail::_State&&) ()
from /lib64/
#9 0x00007ffff2fb071e in std::vector<std::__detail::_State, std::allocator<std::__detail::_State > >::push_back(std::__detail::_State&&) () from /lib64/
#10 0x00007ffff2fae036 in std::__detail::_NFA<std::__cxx11::regex_traits >::_M_insert_state(std::__detail::_State) () from /lib64/
#11 0x00007ffff2fb49b2 in std::__detail::_NFA<std::__cxx11::regex_traits >::_M_insert_line_begin() ()
–Type for more, q to quit, c to continue without paging-- c
from /lib64/
#12 0x00007ffff2fb2364 in std::__detail::_Compiler<std::__cxx11::regex_traits >::_M_assertion() () from /lib64/
#13 0x00007ffff2fb0804 in std::__detail::_Compiler<std::__cxx11::regex_traits >::_M_term() () from /lib64/
#14 0x00007ffff2fae188 in std::__detail::_Compiler<std::__cxx11::regex_traits >::_M_alternative() () from /lib64/
#15 0x00007ffff2faa92e in std::__detail::_Compiler<std::__cxx11::regex_traits >::_M_disjunction() () from /lib64/
#16 0x00007ffff2fa74ad in std::__detail::_Compiler<std::__cxx11::regex_traits >::_Compiler(char const*, char const*, std::locale const&, std::regex_constants::syntax_option_type) () from /lib64/
#17 0x00007ffff2fa1c4e in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits >::_M_compile(char const*, char const*, std::regex_constants::syntax_option_type) () from /lib64/
#18 0x00007ffff229d089 in std::__cxx11::basic_regex<char, std::__cxx11::regex_traits >::basic_regex<std::char_traits, std::allocator >(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::regex_constants::syntax_option_type) () from /lib64/
#19 0x00007ffff228facb in ?? () from /lib64/
#20 0x00007ffff228fbbd in ?? () from /lib64/
#21 0x00007ffff7fd2f9a in ?? () from /lib64/
#22 0x00007ffff7fd3089 in ?? () from /lib64/
#23 0x00007ffff7fe4faa in ?? () from /lib64/
#24 0x0000000000000001 in ?? ()
#25 0x00007fffffffef88 in ?? ()
#26 0x0000000000000000 in ?? ()
console log shows below error infomation.
AddressSanitizer: nested bug in the same thread, aborting.