[BugFix] Fixed potential deadlock during initialization of ExceptionStackContext (#63776)

Signed-off-by: stdpain <drfeng08@gmail.com>
This commit is contained in:
stdpain 2025-10-03 16:35:49 +08:00 committed by GitHub
parent 6dd2c4e555
commit 371134cd5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -416,10 +416,10 @@ void __wrap___cxa_throw(void* thrown_exception, std::type_info* info, void (*des
#elif defined(__GNUC__)
void __wrap___cxa_throw(void* thrown_exception, void* info, void (*dest)(void*)) {
#endif
// to avoid recursively throwing std::bad_alloc exception when check memory limit in memory tracker.
SCOPED_SET_CATCHED(false);
auto print_level = ExceptionStackContext::get_instance()->get_level();
if (print_level != 0) {
// to avoid recursively throwing std::bad_alloc exception when check memory limit in memory tracker.
SCOPED_SET_CATCHED(false);
string exception_name = ExceptionStackContext::get_exception_name((void*)info);
if ((print_level == 1 && ExceptionStackContext::get_instance()->prefix_in_white_list(exception_name)) ||
print_level == -1 ||