This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/65280] -fsanitize=bounds does not detect out-of-bounds access


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65280

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Mar  6 23:44:56 2015
New Revision: 221250

URL: https://gcc.gnu.org/viewcvs?rev=221250&root=gcc&view=rev
Log:
    PR sanitizer/65280
    * doc/invoke.texi: Update description of -fsanitize=bounds.

    * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
    before trying to figure out whether we have a flexible array member.

    * c-c++-common/ubsan/bounds-1.c: Add testing of flexible array
    member-like arrays.
    * c-c++-common/ubsan/bounds-8.c: New test.
    * c-c++-common/ubsan/bounds-9.c: New test.
    * gcc.dg/ubsan/bounds-2.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/ubsan/bounds-8.c
    trunk/gcc/testsuite/c-c++-common/ubsan/bounds-9.c
    trunk/gcc/testsuite/gcc.dg/ubsan/bounds-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-ubsan.c
    trunk/gcc/doc/invoke.texi
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/c-c++-common/ubsan/bounds-1.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]