[Bug sanitizer/65081] -fsanitize=object-size fails with simple pointer arithm
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 18 09:47:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65081
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Feb 18 09:46:59 2015
New Revision: 220784
URL: https://gcc.gnu.org/viewcvs?rev=220784&root=gcc&view=rev
Log:
PR sanitizer/65081
* ubsan.c (OBJSZ_MAX_OFFSET): Define.
(ubsan_expand_objsize_ifn): Don't emit run-time check if the offset
is in range [-16K, -1]. Don't issue run-time error if
(ptr > ptr + offset).
* c-c++-common/ubsan/pr65081.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/ubsan/pr65081.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/ubsan.c
More information about the Gcc-bugs
mailing list