[all-commits] [llvm/llvm-project] 7f1200: Support atomic write operations in stack safety

Florian Mayer via All-commits all-commits at lists.llvm.org
Thu Aug 31 15:41:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f12000a5f8a50630b2cb038b06fb2b932efef18
      https://github.com/llvm/llvm-project/commit/7f12000a5f8a50630b2cb038b06fb2b932efef18
  Author: Florian Mayer <fmayer at google.com>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M llvm/lib/Analysis/StackSafetyAnalysis.cpp
    M llvm/test/Analysis/StackSafetyAnalysis/local.ll
    M llvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll

  Log Message:
  -----------
  Support atomic write operations in stack safety

This has two benefits:
    * we can now mark allocas that are used in atomic operations as safe
    * this fixes a bug that would incorrectly mark all atomic writes as safe
      in HWASan instrumentation. this is because stack safety keeps a list
      of all *unsafe* operations that are reachable from an alloca, but it
      did not analyze atomic writes, so it would always mark them as safe.

Reviewed By: vitalybuka

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




More information about the All-commits mailing list