Fix a bug where dynamic objects' dependency across function call is not recognized [depends-on: #2646] #2694
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes #2646.
The purpose is to fix the issue raised by the failed test case from #2646. Quoting that test case here:
CBMC fails to catch the dependency for
*xacross function calls. Therefore, when runningcbmc --full-slice, functionf()would get skipped and the assertion fails.The cause of the bug is: when passing reaching definition between functions, the states of symbols not in symbol table would be erased. The code snippet for that can be found in
rd_range_domaint::transform_function_callinreaching_definition.cppSince
*xis a dynamic object, it is not in symbol table. No reaching definition information of it would get passed through function calls.The fix
968ba27checks for dynamic objects and do not erase them when going into function call.One potential problem is: since the dynamic object is given name
goto_rw::dynamic-objectin #2646. There might be a symbol name confusion if there's a function namedgoto_rwwith variable name start withdynamic-objectin the program.