This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Avoid undefined behavior in read_subrange_type
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 04 Oct 2018 04:05:40 -0400
- Subject: [binutils-gdb] Avoid undefined behavior in read_subrange_type
*** TEST RESULTS FOR COMMIT d359392f976d48b04a27e6a09b5b61846b0727f9 ***
Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: d359392f976d48b04a27e6a09b5b61846b0727f9
Avoid undefined behavior in read_subrange_type
-fsanitize=undefined pointed out an undefined shift of a negative
value in read_subrange_type. The fix is to do the work in an unsigned
type, where this is defined.
gdb/ChangeLog
2018-10-03 Tom Tromey <tom@tromey.com>
* dwarf2read.c (read_subrange_type): Make "negative_mask"
unsigned.