Page MenuHomePhabricator

[clang] ASTMatchers: Fix out-of-bounds access in foreachArgumentWithParamType.
ClosedPublic

Authored by flx on Nov 24 2021, 12:09 PM.

Details

Summary

The matcher crashes when a variadic function pointer is invoked because the
FunctionProtoType has fewer parameters than arguments.

Matching of non-variadic arguments now works.

Diff Detail

Event Timeline

flx requested review of this revision.Nov 24 2021, 12:09 PM
flx created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 24 2021, 12:09 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sammccall accepted this revision.Dec 7 2021, 1:28 PM
This revision is now accepted and ready to land.Dec 7 2021, 1:28 PM
This revision was landed with ongoing or failed builds.Dec 15 2021, 9:36 AM
This revision was automatically updated to reflect the committed changes.

Hi, this patch is causing a build failure for clang-ppc64le-rhel, can this be reverted?

flx added a comment.Dec 15 2021, 11:19 AM

Hi, this patch is causing a build failure for clang-ppc64le-rhel, can this be reverted?

Hi, I just submitted a forward fix with: https://reviews.llvm.org/D115809

Please let me know if this is not addressing the issue.

Hi, this patch is causing a build failure for clang-ppc64le-rhel, can this be reverted?

Hi, I just submitted a forward fix with: https://reviews.llvm.org/D115809

Please let me know if this is not addressing the issue.

This looks to have resolved the issue, thanks!