I've committed this libbacktrace patch to not fail on the case where there are no bits available when looking backward. This can happen at the very end of the frame if no bits are actually required. The test case is long and may be proprietary, so not including it. Bootstrapped and ran libbacktrace and Go testsuite. Committed to mainline.
Ian * elf.c (elf_fetch_bits_backward) Don't fail if no bits are available.
dda0996e11dbc07f63d3456e36dc5eaec7361004 diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index 3cd87020b03..735f8752500 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -1182,14 +1182,7 @@ elf_fetch_bits_backward (const unsigned char **ppin, val = *pval; if (unlikely (pin <= pinend)) - { - if (bits == 0) - { - elf_uncompress_failed (); - return 0; - } - return 1; - } + return 1; pin -= 4;