gcc/gcc-RHEL-105072-20.patch
Florian Weimer 54f65f0398 Exception handling performance improvements (RHEL-105072)
Add a dependency on the GLIBC_2.35 glibc symbol set to libgcc, which
contains the definition of _dl_find_object.

Resolves: RHEL-105072
2025-07-30 16:42:47 +02:00

39 lines
1.3 KiB
Diff

commit 30adfb85ff994c0faa0cc556ba46838b218263f5
Author: Thomas Neumann <tneumann@users.sourceforge.net>
Date: Mon May 15 14:59:22 2023 +0200
fix assert in non-atomic path
The non-atomic path does not have range information,
we have to adjust the assert handle that case, too.
libgcc/ChangeLog:
* unwind-dw2-fde.c: Fix assert in non-atomic path.
diff --git a/libgcc/unwind-dw2-fde.c b/libgcc/unwind-dw2-fde.c
index fdf52396e8576b79..9b0c229efa5427a9 100644
--- a/libgcc/unwind-dw2-fde.c
+++ b/libgcc/unwind-dw2-fde.c
@@ -240,6 +240,7 @@ __deregister_frame_info_bases (const void *begin)
// And remove
ob = btree_remove (&registered_frames, range[0]);
+ bool empty_table = (range[1] - range[0]) == 0;
#else
init_object_mutex_once ();
__gthread_mutex_lock (&object_mutex);
@@ -276,11 +277,12 @@ __deregister_frame_info_bases (const void *begin)
out:
__gthread_mutex_unlock (&object_mutex);
+ const int empty_table = 0; // The non-atomic path stores all tables.
#endif
// If we didn't find anything in the lookup data structures then they
// were either already destroyed or we tried to remove an empty range.
- gcc_assert (in_shutdown || ((range[1] - range[0]) == 0 || ob));
+ gcc_assert (in_shutdown || (empty_table || ob));
return (void *) ob;
}