Skip to content

Commit 089f832

Browse files
committed
Add test to reproduce crash
1 parent d24dbf3 commit 089f832

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// RUN: %clang_analyze_cc1 -Wno-strict-prototypes -Wno-error=implicit-int -verify %s \
2+
// RUN: -analyzer-checker=core,unix -DPTHREAD_MODEL=1 \
3+
// RUN: -analyzer-checker=debug.ExprInspection -analyzer-config model-pthreads=true
4+
//
5+
// RUN: %clang_analyze_cc1 -Wno-strict-prototypes -Wno-error=implicit-int -verify %s \
6+
// RUN: -analyzer-checker=core,unix -DNO_PTHREAD_MODEL=1 \
7+
// RUN: -analyzer-checker=debug.ExprInspection -analyzer-config model-pthreads=false
8+
9+
void a();
10+
11+
void pthread_create(long *, struct b *, void *, void *);
12+
13+
void c() {
14+
15+
while (1)
16+
17+
a();
18+
19+
}
20+
21+
void d() { pthread_create(d, 0, c, a); }

0 commit comments

Comments
 (0)