Skip to content

SMACK does not catch freeing of stack locations as an invalid-free error #377

Description

@zvonimir

Here is a simple regression for this:

#include "smack.h"

int main(void) {
  int x = __VERIFIER_nondet_int();
  int *y = &x;
  free(y);
  return 0;
}

This regression should fail, and yet it passes. This is due to both stack variable allocation (alloc) and malloc being modeled the same way, mainly setting the Alloc array entry to allocated. Stack variable allocation should probably not do that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions