-
Notifications
You must be signed in to change notification settings - Fork 203
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
Unsound IKOS assumes all code is unreachable #202
Comments
I found a trivial example, where IKOS assumes all code is dead: #include <map>
void init() {
std::map<int, int> m;
}
int foo(int i) {
return 1 / (i - 1); // divide by zero error
}
int main(int argc, char *argv[]) {
init();
foo(argc);
return 0;
} IKOS also reports dead code in
Is there any way to get reason, way IKOS assumes the code is unreachable? |
This is most likely a bug in ikos related to the analysis of C++. |
With some c++ code I'm experiencing the situation, that IKOS thinks all code is dead, which is obviously not the case.
Example from libtins (https://github.com/mfontanini/libtins):
1) This works well:
2) In this file, all code is detected as dead:
It seems like, IKOS assumes, the function body will never be entered.
If I add a hard coded error (eg. divide by zero, array out of bounds) to the first line of the function body, this error is not detected by IKOS. Interestingly, its also not reported as unreachable.
I assume, this issue is not directly related to the function which is analyzed, because the code does not seem to be special.
More over, I assume, its related to some global initialization done by some header file.
Does anyone face similar problems?
Do I hit a limitation regarding c++?
This issue might be related to #130.
The text was updated successfully, but these errors were encountered: