re PR sanitizer/63956 ([UBSAN] ICE segfault in cxx_eval_call_expression ../../gcc...
authorMarek Polacek <polacek@redhat.com>
Mon, 1 Dec 2014 15:29:11 +0000 (15:29 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 1 Dec 2014 15:29:11 +0000 (15:29 +0000)
commit0b274c179f478df449d66bd0707cb9aa05dcafed
treeab16ac18207414d807131a6cc0d31d9904341699
parente42c407c8ad2b2bf30fdfab1f7cb6948f1949f38
re PR sanitizer/63956 ([UBSAN] ICE segfault in cxx_eval_call_expression ../../gcc/cp/constexpr.c)

PR sanitizer/63956
* ubsan.c (is_ubsan_builtin_p): Check also built-in class.
cp/
* constexpr.c: Include ubsan.h.
(cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
internal functions and for ubsan builtins.
* error.c: Include internal-fn.h.
(dump_expr): Add printing of internal functions.
testsuite/
* c-c++-common/ubsan/shift-5.c: Add xfails.
* g++.dg/ubsan/div-by-zero-1.C: Don't use -w.  Add xfail.
* g++.dg/ubsan/pr63956.C: New test.

From-SVN: r218221
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/shift-5.c
gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C
gcc/testsuite/g++.dg/ubsan/pr63956.C [new file with mode: 0644]
gcc/ubsan.c