diff options
| author | Ian Lance Taylor <iant@golang.org> | 2024-07-11 17:58:17 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2024-07-11 17:58:17 -0700 |
| commit | d7318f4cf89c2a934fcd1f87d711081285fad242 (patch) | |
| tree | c83bbe78c3f5df0223c018286e6db71964c735c4 /libbacktrace | |
| parent | b870086904cfd480cf4297525ece00d169482ec7 (diff) | |
libbacktrace: don't fail if symbol size is unknown
* btest.c (test5): Don't fail if symbol size is 0.
* mtest.c (test5): Likewise.
Diffstat (limited to 'libbacktrace')
| -rw-r--r-- | libbacktrace/btest.c | 2 | ||||
| -rw-r--r-- | 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", |
