[Bug sanitizer/82079] missing pointer overflow detection with -fsanitize=pointer-overflow
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Sep 1 20:39:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82079
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
I forgot that pointer offsets are treated internally as signed even if they are
unsigned in the source code. That seems like an important detail for the new
option to document.
Although to be honest, even regardless of the signedness issue, I'm having a
hard time coming up with a use case for this sort of instrumentation. When is
it useful to only have pointer arithmetic overflow diagnosed without diagnosing
all expressions that form out-of-bounds/invalid pointers from valid ones?
More information about the Gcc-bugs
mailing list