Skip to content
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

Handle global variables #1271

Merged
merged 3 commits into from
Oct 9, 2020
Merged

Conversation

MartinNowack
Copy link
Contributor

@MartinNowack MartinNowack commented Jun 12, 2020

Global variables were not handled correctly while validating direct call targets.
This lead to crashes of KLEE.

This PR adds this case to handle direct call targets.

@codecov
Copy link

codecov bot commented Jun 12, 2020

Codecov Report

Merging #1271 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1271      +/-   ##
==========================================
+ Coverage   69.06%   69.08%   +0.02%     
==========================================
  Files         154      154              
  Lines       18204    18207       +3     
  Branches     4042     4043       +1     
==========================================
+ Hits        12572    12578       +6     
+ Misses       3888     3886       -2     
+ Partials     1744     1743       -1     
Impacted Files Coverage Δ
lib/Module/ModuleUtil.cpp 60.36% <100.00%> (+0.55%) ⬆️
lib/Core/Executor.cpp 76.70% <0.00%> (+0.12%) ⬆️

Global variables can't be a direct call target. Their values are read
and treated as indirect call targets.
@MartinNowack MartinNowack changed the title [WIP] Handle global variables Handle global variables Oct 6, 2020
@MartinNowack
Copy link
Contributor Author

@ccadar The test case finally reflects the problem, which can be seen in the increased coverage.
This is ready to go.

@ccadar
Copy link
Contributor

ccadar commented Oct 9, 2020

@MartinNowack excellent! And thanks again, that's an important fix!

@ccadar ccadar merged commit 356b047 into klee:master Oct 9, 2020
@ccadar ccadar moved this from TODO to DONE in KLEE 2.2 Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants