Skip to content

[clang] fix out of bounds access in an empty string when lexing a _Pr… #3887

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

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

hyp
Copy link

@hyp hyp commented Feb 2, 2022

…agma with missing string token

The lexer can attempt to lex a _Pragma and crash with an out of bounds string access when it's
lexing a _Pragma whose string token is an invalid buffer, e.g. when a module header file from which the macro
expansion for that token was deleted from the file system.

Differential Revision: https://reviews.llvm.org/D116052

(cherry picked from commit 979d0ee)

…agma with missing string token

The lexer can attempt to lex a _Pragma and crash with an out of bounds string access when it's
lexing a _Pragma whose string token is an invalid buffer, e.g. when a module header file from which the macro
expansion for that token was deleted from the file system.

Differential Revision: https://reviews.llvm.org/D116052

(cherry picked from commit 979d0ee)
@hyp
Copy link
Author

hyp commented Feb 2, 2022

@swift-ci please test

1 similar comment
@hyp
Copy link
Author

hyp commented Feb 3, 2022

@swift-ci please test

@hyp hyp merged commit e6fbc13 into stable/20211026 Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant