-
Notifications
You must be signed in to change notification settings - Fork 277
Porting of the function pointer restriction feature to variable sensitivity domain branch. #5309
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
Conversation
NlightNFotis
commented
Apr 20, 2020
- Each commit message has a non-empty body, explaining why the change was made.
- Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
- The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
- Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
- My commit message includes data points confirming performance improvements (if claimed).
- My PR is restricted to a single feature or bugfix.
- White-space or formatting changes outside the feature-related changed lines are in commits of their own.
631b641
to
33d9898
Compare
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.
@thk123 doesn't want this to go into VSD directly
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.
unit/Makefile
Outdated
@@ -23,6 +23,8 @@ SRC += analyses/ai/ai.cpp \ | |||
analyses/variable-sensitivity/last_written_location.cpp \ | |||
big-int/big-int.cpp \ | |||
compound_block_locations.cpp \ | |||
get_goto_model_from_c_test.cpp \ | |||
goto-instrument/cover_instrument.cpp \ |
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.
Noting this line is different from original commit
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.
🚫 in fact - this shouldn't be here, the line is included two lines down
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.
Good spot, fixed
The function takes a C program (as a string or an input stream) and converts it to a goto model.
This adds a new option, --restrict-function-pointer, to goto-instrument. This lets a user specify a list of possible pointer targets for specific function pointer call sites, rather than have remove_function_pointers guess possible values. The intended purpose behind this is to prevent excessive symex time wasted on exploring paths the user knows the program can never actually take.
Update to reflect that the feature is now a goto-instrument analysis
This works similar to restrict-function-pointer, but for names of individual function pointer variables (globals, locals, parameters) rather than call sites. This isn't applicable to all situations (for example, calling function pointers in structs or function pointers returned from functions), but is more readily applicable to some common use scenarios (e.g. global function pointers loaded at start time like in OpenGL).
- remove unnecessary loop - make it return the restriction instead of inserting it into the map
33d9898
to
45d171f
Compare
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.
Verified all the commits have been ported over identically to how they were merged into develop
0d9c35f
into
diffblue:variable-sensitivity-with-get-function-pointers