diff options
author | Thomas Neumann <tneumann@users.sourceforge.net> | 2022-09-23 15:57:13 +0200 |
---|---|---|
committer | Thomas Neumann <tneumann@users.sourceforge.net> | 2022-09-26 15:12:02 +0200 |
commit | 386ebf75f4c0342b1f823f4e4aba07abda3288d1 (patch) | |
tree | 8e744f5f80f8a145d540982a56096761d43c7171 | |
parent | 6904ed80a26f5216aa3b9ce8377fb50307c8e886 (diff) | |
download | gcc-386ebf75f4c0342b1f823f4e4aba07abda3288d1.zip gcc-386ebf75f4c0342b1f823f4e4aba07abda3288d1.tar.gz gcc-386ebf75f4c0342b1f823f4e4aba07abda3288d1.tar.bz2 |
fix assert in __deregister_frame_info_bases
When using the atomic fast path deregistering can fail during
program shutdown if the lookup structures are already destroyed.
The assert in __deregister_frame_info_bases takes that into
account. In the non-fast-path case however is not aware of
program shutdown, which caused a compiler error on such platforms.
We fix that by introducing a constant for in_shutdown in
non-fast-path builds.
We also drop the destructor priority, as it is not supported on
all platforms and we no longer rely upon the priority anyway.
libgcc/ChangeLog:
* unwind-dw2-fde.c: Introduce a constant for in_shutdown
for the non-fast-path case. Drop destructor priority.
-rw-r--r-- | libgcc/unwind-dw2-fde.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libgcc/unwind-dw2-fde.c b/libgcc/unwind-dw2-fde.c index d237179..3c0cc65 100644 --- a/libgcc/unwind-dw2-fde.c +++ b/libgcc/unwind-dw2-fde.c @@ -51,7 +51,7 @@ static struct btree registered_frames; static bool in_shutdown; static void -release_registered_frames (void) __attribute__ ((destructor (110))); +release_registered_frames (void) __attribute__ ((destructor)); static void release_registered_frames (void) { @@ -67,6 +67,8 @@ static void init_object (struct object *ob); #else +/* Without fast path frame deregistration must always succeed. */ +static const int in_shutdown = 0; /* The unseen_objects list contains objects that have been registered but not yet categorized in any way. The seen_objects list has had |