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

Use of uninitialized variable causes an error #149

Closed
robby-phd opened this issue Jun 24, 2016 · 0 comments
Closed

Use of uninitialized variable causes an error #149

robby-phd opened this issue Jun 24, 2016 · 0 comments
Labels
obsolete Issues that involve/depend on deprecated code, such that they are not worth pursuing type: bug Issues reporting bugs or unexpected/unwanted behavior

Comments

@robby-phd
Copy link
Contributor

For the following code:

#include <stdint.h>
#include <stdio.h>

uint8_t foo(uint8_t x) {
  return 0;
}

int main() {
  uint8_t x;
  printf("foo(x): %d\n", foo(x));
}

SAW gives the following error message:

Simulation error: Invalid load address (lss__alloc1)
  at #0:@main:%0.0:1
...

(Attached is a zip file to easily reduplicate the issue; just uncompress and run run.sh):

In cases like these, it'd probably good to either:

  1. give a helpful error message indicating there is use of uninit var and stop the verification process; or
  2. continue the verification process by using a fresh symbolic value/free variable, but also outputs a warning to indicate a potential issue in the code (use of uninit var).

saw-uninit-var.zip

@atomb atomb added type: bug Issues reporting bugs or unexpected/unwanted behavior priority High-priority issues labels May 2, 2017
@atomb atomb added obsolete Issues that involve/depend on deprecated code, such that they are not worth pursuing and removed priority High-priority issues labels Apr 2, 2019
brianhuffman pushed a commit that referenced this issue Apr 26, 2021
Add congruence rule for IntModNum and extend `proveEq` to handle Z type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
obsolete Issues that involve/depend on deprecated code, such that they are not worth pursuing type: bug Issues reporting bugs or unexpected/unwanted behavior
Projects
None yet
Development

No branches or pull requests

3 participants