From 0cb5d00374433acbdd4fbb7fbe60e734c94c3f15 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 11 Jul 2024 17:58:17 -0700 Subject: [PATCH] libbacktrace: don't fail if symbol size is unknown * btest.c (test5): Don't fail if symbol size is 0. * mtest.c (test5): Likewise. --- btest.c | 2 +- mtest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/btest.c b/btest.c index d755484..cbc4511 100644 --- a/btest.c +++ b/btest.c @@ -439,7 +439,7 @@ test5 (void) (unsigned long) (uintptr_t) &global); symdata.failed = 1; } - else if (symdata.size != sizeof (global)) + else if (symdata.size != sizeof (global) && symdata.size != 0) { fprintf (stderr, "test5: unexpected syminfo size got %lx expected %lx\n", diff --git a/mtest.c b/mtest.c index 359da1f..9a8d9c0 100644 --- a/mtest.c +++ b/mtest.c @@ -373,7 +373,7 @@ test5 (void) (unsigned long) (uintptr_t) &global); symdata.failed = 1; } - else if (symdata.size != sizeof (global)) + else if (symdata.size != sizeof (global) && symdata.size != 0) { fprintf (stderr, "test5: unexpected syminfo size got %lx expected %lx\n",