-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing library functions for Concrat benchmarks #996
Conversation
("difftime", unknown [drop "time1" []; drop "time2" []]); | ||
("system", unknown [drop "command" [r]]); | ||
("wcscat", unknown [drop "dest" [r; w]; drop "src" [r]]); | ||
("abs", unknown [drop "j" []]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth actually handling? Seems simple enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, yes, given that we handle fabs
and its variants. I'd leave it as a separate issue/PR though because a new operation needs to be implemented for all int domains.
("localtime_r", unknown [drop "timep" [r]; drop "result" [w]]); | ||
("strsep", unknown [drop "stringp" [r_deep; w]; drop "delim" [r]]); | ||
("strcasestr", unknown [drop "haystack" [r]; drop "needle" [r]]); | ||
("strpbrk", unknown [drop "s" [r]; drop "accept" [r]]); | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these it would be nice if we could somehow specify that the resulting pointer still points inside the first blob to avoid having unknown pointers. Just a thought though, no need to do this here.
("pthread_attr_setschedpolicy", unknown [drop "attr" [r; w]; drop "policy" []]); | ||
("pthread_condattr_init", unknown [drop "attr" [w]]); | ||
("pthread_condattr_setclock", unknown [drop "attr" [w]; drop "clock_id" []]); | ||
("pthread_mutexattr_destroy", unknown [drop "attr" [f]]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See also #839
@@ -104,6 +149,13 @@ let pthread_descs_list: (string * LibraryDesc.t) list = LibraryDsl.[ | |||
("pthread_key_delete", unknown [drop "key" [f]]); | |||
("pthread_cancel", unknown [drop "thread" []]); | |||
("pthread_setcanceltype", unknown [drop "type" []; drop "oldtype" [w]]); | |||
("pthread_detach", unknown [drop "thread" []]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May also be a candidate for handling.
("__sync_fetch_and_add", unknown (drop "ptr" [r; w] :: drop "value" [] :: VarArgs (drop' []))); | ||
("__sync_fetch_and_sub", unknown (drop "ptr" [r; w] :: drop "value" [] :: VarArgs (drop' []))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth translating these into normal assignments? This would just lose information about them being race-free, but may still preserve some precision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly. There's a whole lot of other atomic operations (including C11 ones) that could also be handled similarly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comments, this looks good to me!
It's nice that you put in the legwork here to get all of them properly classified!
Co-authored-by: Michael Schwarz <michael.schwarz93@gmail.com>
Co-authored-by: Michael Schwarz <michael.schwarz93@gmail.com>
Co-authored-by: Michael Schwarz <michael.schwarz93@gmail.com>
Co-authored-by: Michael Schwarz <michael.schwarz93@gmail.com>
CHANGES: * Add `setjmp`/`longjmp` analysis (goblint/analyzer#887, goblint/analyzer#970, goblint/analyzer#1015, goblint/analyzer#1019). * Refactor race analysis to lazy distribution (goblint/analyzer#1084, goblint/analyzer#1089, goblint/analyzer#1136, goblint/analyzer#1016). * Add thread-unsafe library function call analysis (goblint/analyzer#723, goblint/analyzer#1082). * Add mutex type analysis and mutex API analysis (goblint/analyzer#800, goblint/analyzer#839, goblint/analyzer#1073). * Add interval set domain and string literals domain (goblint/analyzer#901, goblint/analyzer#966, goblint/analyzer#994, goblint/analyzer#1048). * Add affine equalities analysis (goblint/analyzer#592). * Add use-after-free analysis (goblint/analyzer#1050, goblint/analyzer#1114). * Add dead code elimination transformation (goblint/analyzer#850, goblint/analyzer#979). * Add taint analysis for partial contexts (goblint/analyzer#553, goblint/analyzer#952). * Add YAML witness validation via unassume (goblint/analyzer#796, goblint/analyzer#977, goblint/analyzer#1044, goblint/analyzer#1045, goblint/analyzer#1124). * Add incremental analysis rename detection (goblint/analyzer#774, goblint/analyzer#777). * Fix address sets unsoundness (goblint/analyzer#822, goblint/analyzer#967, goblint/analyzer#564, goblint/analyzer#1032, goblint/analyzer#998, goblint/analyzer#1031). * Fix thread escape analysis unsoundness (goblint/analyzer#939, goblint/analyzer#984, goblint/analyzer#1074, goblint/analyzer#1078). * Fix many incremental analysis issues (goblint/analyzer#627, goblint/analyzer#836, goblint/analyzer#835, goblint/analyzer#841, goblint/analyzer#932, goblint/analyzer#678, goblint/analyzer#942, goblint/analyzer#949, goblint/analyzer#950, goblint/analyzer#957, goblint/analyzer#955, goblint/analyzer#954, goblint/analyzer#960, goblint/analyzer#959, goblint/analyzer#1004, goblint/analyzer#558, goblint/analyzer#1010, goblint/analyzer#1091). * Fix server mode for abstract debugging (goblint/analyzer#983, goblint/analyzer#990, goblint/analyzer#997, goblint/analyzer#1000, goblint/analyzer#1001, goblint/analyzer#1013, goblint/analyzer#1018, goblint/analyzer#1017, goblint/analyzer#1026, goblint/analyzer#1027). * Add documentation for configuration JSON schema and OCaml API (goblint/analyzer#999, goblint/analyzer#1054, goblint/analyzer#1055, goblint/analyzer#1053). * Add many library function specifications (goblint/analyzer#962, goblint/analyzer#996, goblint/analyzer#1028, goblint/analyzer#1079, goblint/analyzer#1121, goblint/analyzer#1135, goblint/analyzer#1138). * Add OCaml 5.0 support (goblint/analyzer#1003, goblint/analyzer#945, goblint/analyzer#1162).
Adds a bunch of missing library function specifications for goblint/bench#53.