This is an archive of the discontinued LLVM Phabricator instance.

[clang] Prevent possible use-after-free
ClosedPublic

Authored by kadircet on Aug 18 2023, 5:29 AM.

Details

Summary

This prevents further parsing of tokens (that'll be freed) inside method
body by propagating EOF emitted by reaching code completion token up the parsing
stack.

Diff Detail

Event Timeline

kadircet created this revision.Aug 18 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2023, 5:29 AM
kadircet requested review of this revision.Aug 18 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2023, 5:29 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
ilya-biryukov accepted this revision.Aug 18 2023, 6:41 AM

LGTM. Thanks for getting to the bottom of this!

clang/lib/Parse/ParseObjc.cpp
3768

Suggestion

This revision is now accepted and ready to land.Aug 18 2023, 6:41 AM
This revision was landed with ongoing or failed builds.Aug 18 2023, 7:28 AM
This revision was automatically updated to reflect the committed changes.
kadircet marked an inline comment as done.