repo.or.cz
/
blocksruntime.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[ASan/Win] Don't crash when ASAN_OPTIONS have disable_core=1
[blocksruntime.git]
/
test
/
tsan
/
longjmp2.cc
blob
546019b2d11a1db6db8c937bf018720a23cf809d
1
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
2
#include <stdio.h>
3
#include <stdlib.h>
4
#include <setjmp.h>
5
6
int
foo
(
sigjmp_buf env
) {
7
printf
(
"env=%p
\n
"
,
env
);
8
siglongjmp
(
env
,
42
);
9
}
10
11
int
main
() {
12
sigjmp_buf env
;
13
printf
(
"env=%p
\n
"
,
env
);
14
if
(
sigsetjmp
(
env
,
1
) ==
42
) {
15
printf
(
"JUMPED
\n
"
);
16
return
0
;
17
}
18
foo
(
env
);
19
printf
(
"FAILED
\n
"
);
20
return
0
;
21
}
22
23
// CHECK-NOT: FAILED
24
// CHECK: JUMPED