This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 24 Apr 2014 11:49:05 +0200
- Subject: Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128
On Thu, 2014-04-24 at 00:32 +0200, Petr Machata wrote:
> Mark Wielaard <mjw@redhat.com> writes:
> > But I think I prefer the fix using multiplication as posted here:
> > https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-April/003991.html
> > That one is also just a oneliner and more generic since it doesn't rely
> > on having to cast to uint64_t. And Richard checked it still just
> > generates a shift.
>
> Ah, cool, I didn't notice that e-mail.
OK, I pushed that fix and the other undefined behavior fixes posted
earlier to master now:
readelf: handle_core_item make sure variable length array isn't zero size.
libdwfl: __libdwfl_frame_reg_[gs]et use uint64_t when checking bits.
readelf.c (print_gdb_index_section): Use unsigned int for 31 bits left shift.
libdw (get_sleb128_step): Remove undefined behavior.
make CFLAGS="-g -fsanitize=undefined" && \
make CFLAGS="-g -fsanitize=undefined" check
with gcc 4.9 should have zero FAILs now.
Cheers,
Mark