From d7318f4cf89c2a934fcd1f87d711081285fad242 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. --- libbacktrace/btest.c | 2 +- libbacktrace/mtest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libbacktrace/btest.c b/libbacktrace/btest.c index c4b2db2cce2..3b603f643fa 100644 --- a/libbacktrace/btest.c +++ b/libbacktrace/btest.c @@ -440,7 +440,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/libbacktrace/mtest.c b/libbacktrace/mtest.c index f793391653d..5ec43c7bbce 100644 --- a/libbacktrace/mtest.c +++ b/libbacktrace/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",