https://sourceware.org/bugzilla/show_bug.cgi?id=26773
--- Comment #3 from Mark Wielaard ---
(In reply to Tom Tromey from comment #1)
> I looked at this a little today.
>
> In addition to this bug, I think the _unchecked variants
> have another bug; namely they do:
>
> const size_t max = len_l
https://sourceware.org/bugzilla/show_bug.cgi?id=26773
--- Comment #4 from Mark Wielaard ---
(In reply to Josh Stone from comment #2)
> (In reply to Tom Tromey from comment #1)
> > This limits the number of bytes read-- but it seems like
> > it maybe ought to read until the first byte without the
The read_3ubyte_unaligned_inc macro calls read_2ubyte_unaligned, but
it should call read_3ubyte_unaligned.
Signed-off-by: Tom Tromey
---
libdw/ChangeLog | 5 +
libdw/memory-access.h | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
PR 26773 points out that some sleb128 values are decoded incorrectly.
Looking into this, I found some other unusual cases as well.
In this patch, I chose to try to handle weird leb128 encodings by
preserving their values when possible; or returning the maximum value
on overflow. It isn't clear to