Skip to content

Memory leak not reported #836

@yc2lee

Description

@yc2lee

The following code generates a memory leak error, which it's supposed to do.

#include <stdlib.h>
#include <stdio.h>

int *f(void) {
  //const unsigned int i = 100;
  int *a = malloc(100);
  return a;
}

int main(void) {
  int *b = f();
  printf("%p\n", b);
  return 0;
}

But if you uncomment the definition of i and use malloc(i), no memory leaks are reported.

The problem is not ASAN parser because the binary executable created by Seashell does not report any errors either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions