Skip to content

Commit

Permalink
Improve plain thread ID is_unique
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Oct 28, 2024
1 parent bdc288e commit 568e97c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cdomain/value/cdomains/threadIdDomain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct
| ({vname; _}, None) -> List.mem vname @@ GobConfig.get_string_list "mainfun"
| _ -> false

let is_unique _ = false (* TODO: should this consider main unique? *)
let is_unique = is_main
let may_create _ _ = true
let is_must_parent _ _ = false
end
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/51-threadjoins/10-join-main-plain.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main(void) {
pthread_t id2;
pthread_create(&id2, NULL, t_fun, NULL);

g++; // TODO NORACE
g++; // NORACE
printf("main: %d\n", g);

pthread_exit(NULL); // exit main thread but keep id2 alive, otherwise main returning kills id2
Expand Down

0 comments on commit 568e97c

Please sign in to comment.