Skip to content

flow analysis #404

@thradams

Description

@thradams

I believe the following code is not producing the expected result or diagnostics.

#pragma safety enable

void* _Owner _Opt calloc(unsigned long i, unsigned long size);
void free(void* _Owner _Opt ptr);

int main() {
    try {
       int * _Owner  p1 = calloc(1, sizeof * p1)!;       
       defer free(p1);
       return 0;
    }
    catch { }   
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions