-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Clang trunk crash: infinite macro expansion leads to stack overflow during macro argument expansion #137863
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
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
duplicate
Resolved as duplicate
Comments
@llvm/issue-subscribers-clang-frontend Author: None (mariete1223)
## Summary
Clang (trunk version) crashes when compiling a C program with heavily nested recursive macro expansions. Stack dump
Program
To quickly reproduce |
Duplicate of: #23843 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
duplicate
Resolved as duplicate
Summary
Clang (trunk version) crashes when compiling a C program with heavily nested recursive macro expansions.
Instead of cleanly rejecting the expansion due to excessive depth, the compiler crashes deep inside the preprocessor (TokenLexer::ExpandFunctionArguments) causing a fatal error.
Stack dump
Program
To quickly reproduce
https://gcc.godbolt.org/z/Kh5xdajWs
The text was updated successfully, but these errors were encountered: