[PATCH] D159153: Support atomic write operations in stack safety

Florian Mayer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 14:17:03 PDT 2023


fmayer created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
fmayer updated this revision to Diff 554822.
fmayer added a comment.
fmayer updated this revision to Diff 554830.
fmayer retitled this revision from "Support atomic writes in stack safety" to "Support atomic write operations in stack safety".
fmayer edited the summary of this revision.
fmayer edited the summary of this revision.
fmayer published this revision for review.
fmayer added a reviewer: vitalybuka.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

tests


fmayer added a comment.

tests


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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159153

Files:
  llvm/include/llvm/IR/Instructions.h
  llvm/lib/Analysis/StackSafetyAnalysis.cpp
  llvm/test/Analysis/StackSafetyAnalysis/local.ll
  llvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159153.554830.patch
Type: text/x-patch
Size: 9653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230830/3d710ff6/attachment.bin>


More information about the llvm-commits mailing list