On Thu, 2014-04-24 at 00:32 +0200, Petr Machata wrote:
Mark Wielaard <mjw(a)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...
> 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