[Bug other/83182] undefined behavior in generic_wide_int due to missing input validation
rsandifo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 27 22:22:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83182
--- Comment #1 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
wi::to_offset does check for an INTEGER_CST, via the tree.h accessor macros.
Are you sure you have a normal --enable-checking=yes build? I get:
cc1: internal compiler error: tree check: expected integer_cst, have
trunc_div_expr in get_len, at tree.h:5315
with the quoted example.
But yeah, I've certainly no objection in principle to extra
gcc_checking_asserts in wide-int.h itself.
More information about the Gcc-bugs
mailing list