Add a test for vcall on a null ptr.
authorIvan Krasin <krasin@chromium.org>
Mon, 21 Nov 2016 21:23:56 +0000 (21:23 +0000)
committerIvan Krasin <krasin@chromium.org>
Mon, 21 Nov 2016 21:23:56 +0000 (21:23 +0000)
commit694c28495abbdc8bace4c331357b3b7971da084d
tree2d66e34d4975677125992183ee7eab28cd7dd2b8
parent7a7477c71f7fe6e7f4ed780df490b000d861c489
Add a test for vcall on a null ptr.

Summary:
Turns out that in the case of -fsanitize=null and a virtual call,
the type check was generated *after* reading from vtable, which
causes a non-interpretable segfault. The check has been moved up
in https://reviews.llvm.org/D26559 and this CL adds a test for this case.

Reviewers: pcc

Subscribers: cfe-commits, kubabrecka

Differential Revision: https://reviews.llvm.org/D26560

llvm-svn: 287578
compiler-rt/test/ubsan/TestCases/TypeCheck/null.cpp