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

Symbiotic failed to find invalid free and memory leak #226

Open
vmihalko opened this issue May 9, 2022 · 0 comments
Open

Symbiotic failed to find invalid free and memory leak #226

vmihalko opened this issue May 9, 2022 · 0 comments
Labels

Comments

@vmihalko
Copy link

vmihalko commented May 9, 2022

Hi,
in following test (from: predator-regre):

#include <verifier-builtins.h>
#include <stdlib.h>

int main()
{
    union {
        void *p0;

        struct {
            char c[2];
            void *p1;
            void *p2;
        } str;

    } data;

    // alloc 37B on heap
    data.p0 = malloc(37);

    // this should be fine
    data.str.p2 = &data;

    // this introduces a memleak
    data.str.c[1] = sizeof data.str.p1;

    // invalid free()
    free(data.p0);

    return 0;
}

Symbiotic failed to find invalid free and memory-leak error.
But after running: symbiotic --prp=memsafety --no-slice test-0158.c symbiotic successfully find the invalid free error.

@lzaoral lzaoral added the bug label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants