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

constval/createUndefValue: replacing LLVM undef value by all zeros is not accurate #41

Open
tomsik68 opened this issue Jul 20, 2020 · 1 comment

Comments

@tomsik68
Copy link
Member

tomsik68 commented Jul 20, 2020

We need this for scalar as well as aggregate type of undef value.

It would be nice to have a choice:

  1. The default behavior could be to crash with an error message that undef value doesn't translate to C.
  2. For sv-comp compatible verifiers, we need an option to replace undef values by __VERIFIER_nondet_* (depending on type).
  3. We can still have the option to replace undef value by zero, but user has to ask for it explicitly.
@tomsik68
Copy link
Member Author

Actually, undef value can easily be created in C by allocating a variable without assigning any value to it. This is a better candidate for the default behavior than crashing.

int main() {
    int a;
    return a;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant