-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1173 from goblint/thread-self-create
Fix thread analysis termination with a self-creating thread
- Loading branch information
Showing
2 changed files
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// PARAM: --set ana.activated[+] thread | ||
// Checks termination of thread analysis with a thread who is its own single parent. | ||
#include <pthread.h> | ||
|
||
void *t_fun(void *arg) { | ||
pthread_t id; | ||
pthread_create(&id, NULL, t_fun, NULL); | ||
return NULL; | ||
} | ||
|
||
int main(void) { | ||
pthread_t id; | ||
pthread_create(&id, NULL, t_fun, NULL); | ||
return 0; | ||
} |