Commit c8aa1929 by Jakub Jelinek Committed by Jakub Jelinek

re PR sanitizer/65004 (Compare debug failure with -fno-sanitize-recover…

re PR sanitizer/65004 (Compare debug failure with -fno-sanitize-recover -fsanitize=address -fsanitize=undefined)

	PR sanitizer/65004
	* ubsan.c (ubsan_expand_vptr_ifn): Always return true.

	* g++.dg/asan/pr65004.C: New test.

From-SVN: r220596
parent 2fdc0399
2015-02-10 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/65004
* ubsan.c (ubsan_expand_vptr_ifn): Always return true.
2015-02-10 Oleg Endo <olegendo@gcc.gnu.org> 2015-02-10 Oleg Endo <olegendo@gcc.gnu.org>
PR target/64661 PR target/64661
......
2015-02-10 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/65004
* g++.dg/asan/pr65004.C: New test.
2015-02-10 Oleg Endo <olegendo@gcc.gnu.org> 2015-02-10 Oleg Endo <olegendo@gcc.gnu.org>
PR target/64661 PR target/64661
......
// PR sanitizer/65004
// { dg-do compile }
// { dg-options "-fcompare-debug -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all" }
namespace N {
template <typename Signature> struct function;
namespace detail {
namespace function {
struct vtable_base { };
}
}
struct function_base {
detail::function::vtable_base * vtable;
};
template <typename R, typename T0> struct function1 : public function_base { };
template <typename R, typename T0> struct function <R (T0)> : public function1 <R, T0> { };
}
namespace Bar {
typedef N::function <void (const char *)> WarningHandler;
}
namespace Foo {
struct FooRecord {
virtual ~FooRecord ();
};
struct TestRecord : public FooRecord {
long x;
};
}
namespace Foo {
using Bar::WarningHandler;
struct FooScanner {
WarningHandler warnHandler;
int readByte ();
long readSignedInteger ();
};
struct FooRecordReader {
FooScanner & scanner;
long readSInt ();
void readTestRecord (TestRecord * recp);
};
inline long FooRecordReader::readSInt () {
return scanner.readSignedInteger ();
}
void FooRecordReader::readTestRecord (TestRecord * recp) {
int infoByte = scanner.readByte ();
recp->x = readSInt ();
}
}
...@@ -1148,7 +1148,7 @@ ubsan_expand_vptr_ifn (gimple_stmt_iterator *gsip) ...@@ -1148,7 +1148,7 @@ ubsan_expand_vptr_ifn (gimple_stmt_iterator *gsip)
/* Get rid of the UBSAN_VPTR call from the IR. */ /* Get rid of the UBSAN_VPTR call from the IR. */
unlink_stmt_vdef (stmt); unlink_stmt_vdef (stmt);
gsi_remove (&gsi, true); gsi_remove (&gsi, true);
return gsi_end_p (*gsip); return true;
} }
/* Instrument a memory reference. BASE is the base of MEM, IS_LHS says /* Instrument a memory reference. BASE is the base of MEM, IS_LHS says
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment