[all-commits] [llvm/llvm-project] ad2d6b: Fix potential infinite loop with malformed attribu...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Thu Apr 15 07:48:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad2d6bbb1435cef0a048c9aed3dcf9617640f222
      https://github.com/llvm/llvm-project/commit/ad2d6bbb1435cef0a048c9aed3dcf9617640f222
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2021-04-15 (Thu, 15 Apr 2021)

  Changed paths:
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/test/Parser/c2x-attributes.c
    M clang/test/Parser/cxx-attributes.cpp

  Log Message:
  -----------
  Fix potential infinite loop with malformed attribute syntax

Double square bracket attribute arguments can be arbitrarily complex,
and the attribute argument parsing logic recovers by skipping tokens.
As a fallback recovery mechanism, parse recovery stops before reading a
semicolon. This could lead to an infinite loop in the attribute list
parsing logic.




More information about the All-commits mailing list