[all-commits] [llvm/llvm-project] f5145f: [Clang][NFC] Fix out-of-bounds access (#77193)

Krystian Stasiowski via All-commits all-commits at lists.llvm.org
Mon Jan 8 15:21:30 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f5145f4dc819d73ff8bebcfba3779533b150884e
      https://github.com/llvm/llvm-project/commit/f5145f4dc819d73ff8bebcfba3779533b150884e
  Author: Krystian Stasiowski <sdkrystian at gmail.com>
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
    M clang/include/clang/Analysis/CFG.h

  Log Message:
  -----------
  [Clang][NFC] Fix out-of-bounds access (#77193)

The changes to tablegen made by
https://github.com/llvm/llvm-project/pull/76825 result in
`StmtClass::lastStmtConstant` changing from `StmtClass::WhileStmtClass`
to `StmtClass::GCCAsmStmtClass`. Since `CFG::BuildOptions::alwaysAdd` is
never called with a `WhileStmt`, this has flown under the radar until
now.

Once such test in which an out-of-bounds access occurs is
`test/Sema/inline-asm-validate.c`, among many others.




More information about the All-commits mailing list