Skip to content

3C crash when same function has declaration and definition in different files with different parameter types #414

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

Closed
mattmccutchen-cci opened this issue Feb 3, 2021 · 0 comments · Fixed by #463
Assignees
Labels
bug Something isn't working priority:1 Highest priority item

Comments

@mattmccutchen-cci
Copy link
Member

3C crashes when the same function has a declaration and a definition in different files with different parameter types. This is the same original problem as #283, but with a declaration and a definition instead of two declarations. An example is 3c -output-postfix=checked mismatch1.c mismatch2.c with:

mismatch1.c:

void foo(char *x);

mismatch2.c:

void foo(char **y) {
  // this is the body
}

I hope this can be fixed by simply applying the same safety check we currently have in the two-declaration case (from #330) to the "declaration and definition" case.

@mattmccutchen-cci mattmccutchen-cci added the bug Something isn't working label Feb 3, 2021
@mwhicks1 mwhicks1 added the priority:1 Highest priority item label Feb 4, 2021
@kyleheadley kyleheadley self-assigned this Feb 5, 2021
@kyleheadley kyleheadley linked a pull request Mar 4, 2021 that will close this issue
6 tasks
@kyleheadley kyleheadley mentioned this issue Mar 4, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:1 Highest priority item
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants