[ASan] Simplify exception/longjmp tests even further
llvm-svn: 213646
This commit is contained in:
parent
bd1a49bf81
commit
8f41c3eb74
|
|
@ -2,14 +2,12 @@
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <sanitizer/asan_interface.h>
|
#include <sanitizer/asan_interface.h>
|
||||||
|
|
||||||
static jmp_buf buf;
|
static jmp_buf buf;
|
||||||
|
|
||||||
void TestLongJmp() {
|
int main() {
|
||||||
char x[32];
|
char x[32];
|
||||||
fprintf(stderr, "\nTestLongJmp\n");
|
fprintf(stderr, "\nTestLongJmp\n");
|
||||||
fprintf(stderr, "Before: %p poisoned: %d\n", &x,
|
fprintf(stderr, "Before: %p poisoned: %d\n", &x,
|
||||||
|
|
@ -23,7 +21,3 @@ void TestLongJmp() {
|
||||||
// https://code.google.com/p/address-sanitizer/issues/detail?id=258
|
// https://code.google.com/p/address-sanitizer/issues/detail?id=258
|
||||||
assert(!__asan_address_is_poisoned(x + 32));
|
assert(!__asan_address_is_poisoned(x + 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
TestLongJmp();
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,7 @@
|
||||||
// XFAIL: win32
|
// XFAIL: win32
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <setjmp.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <sanitizer/asan_interface.h>
|
#include <sanitizer/asan_interface.h>
|
||||||
|
|
||||||
__attribute__((noinline))
|
__attribute__((noinline))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue