re PR sanitizer/59415 (ICE segfault in verify_bb_vtables for g++ -S -fvtable-verify=std -fsanitize=null)
PR sanitizer/59415 * vtable-verify.c (verify_bb_vtables): Check the return value of gimple_call_fn. Use is_gimple_call instead of gimple_code. testsuite/ * g++.dg/ubsan/pr59415.C: New test. From-SVN: r205805
This commit is contained in:
parent
85591a5ca5
commit
fe46e7aa01
|
@ -1,3 +1,9 @@
|
|||
2013-12-09 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR sanitizer/59415
|
||||
* vtable-verify.c (verify_bb_vtables): Check the return value
|
||||
of gimple_call_fn. Use is_gimple_call instead of gimple_code.
|
||||
|
||||
2013-12-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
* config/arm/arm.md (generic_sched): Add cortexa12.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2013-12-09 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR sanitizer/59415
|
||||
* g++.dg/ubsan/pr59415.C: New test.
|
||||
|
||||
2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/52707
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-fsanitize=null -Wall -fvtable-verify=std" } */
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
throw 0;
|
||||
}
|
|
@ -586,10 +586,10 @@ verify_bb_vtables (basic_block bb)
|
|||
stmt = gsi_stmt (gsi_virtual_call);
|
||||
|
||||
/* Count virtual calls. */
|
||||
if (gimple_code (stmt) == GIMPLE_CALL)
|
||||
if (is_gimple_call (stmt))
|
||||
{
|
||||
tree fncall = gimple_call_fn (stmt);
|
||||
if (TREE_CODE (fncall) == OBJ_TYPE_REF)
|
||||
if (fncall && TREE_CODE (fncall) == OBJ_TYPE_REF)
|
||||
total_num_virtual_calls++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue