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

Track the exception pointer #126

Open
arthaud opened this issue Jul 8, 2019 · 0 comments
Open

Track the exception pointer #126

arthaud opened this issue Jul 8, 2019 · 0 comments
Labels
C-false-positive Category: False Positive L-c++ Language: C++ P-low Priority: Low

Comments

@arthaud
Copy link
Member

arthaud commented Jul 8, 2019

IKOS does not currently track the exception pointer, which leads to imprecision.

For instance, on the following code:

#include <ikos/analyzer/intrinsic.h>

void f() {
  if (__ikos_nondet_int()) {
    throw 0x42;
  }
}

int main() {
  try {
    f();
  } catch (double) {
    __ikos_assert(0);
  } catch (int) {
    __ikos_assert(1);
  }
  return 0;
}

IKOS reports:

test.cpp:13:5: error: assertion never holds
    __ikos_assert(0);
    ^

It should report this as dead code instead of reporting an error.

@arthaud arthaud added L-c++ Language: C++ C-false-positive Category: False Positive enhancement P-low Priority: Low and removed enhancement labels Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-false-positive Category: False Positive L-c++ Language: C++ P-low Priority: Low
Projects
None yet
Development

No branches or pull requests

1 participant