summaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-03 17:59:31 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-03 17:59:31 +0000
commit2c4c347700af66c7e5ce7c0f998270613e62b988 (patch)
tree47ea0e1220f5468397f6fdb89cae25257bd9e763 /gcc/cp/ChangeLog
parentea151fae4de4aca6d2ce029bd7fe00ded77b0e9c (diff)
downloadgcc-2c4c347700af66c7e5ce7c0f998270613e62b988.tar.gz
Implement -fsanitize=vla-bound.
* opts.c (common_handle_option): Handle vla-bound. * sanitizer.def (BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE): Define. * flag-types.h (enum sanitize_code): Add SANITIZE_VLA. * asan.c (initialize_sanitizer_builtins): Build BT_FN_VOID_PTR_PTR. c-family/ * c-ubsan.c: Don't include hash-table.h. (ubsan_instrument_vla): New function. * c-ubsan.h: Declare it. cp/ * decl.c (cp_finish_decl): Move C++1y bounds checking... (compute_array_index_type): ...here. Add VLA instrumentation. Call stabilize_vla_size. (grokdeclarator): Don't call stabilize_vla_size here. c/ * c-decl.c (grokdeclarator): Add VLA instrumentation. testsuite/ * g++.dg/ubsan/cxx1y-vla.C: New test. * c-c++-common/ubsan/vla-3.c: New test. * c-c++-common/ubsan/vla-2.c: New test. * c-c++-common/ubsan/vla-4.c: New test. * c-c++-common/ubsan/vla-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204334 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/ChangeLog')
-rw-r--r--gcc/cp/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 694aaae6de3..cadf6749e6c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-03 Marek Polacek <polacek@redhat.com>
+
+ * decl.c (cp_finish_decl): Move C++1y bounds checking...
+ (compute_array_index_type): ...here. Add VLA instrumentation.
+ Call stabilize_vla_size.
+ (grokdeclarator): Don't call stabilize_vla_size here.
+
2013-11-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/29234