Files
clang-p2996/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Oliver Stannard 7d72525909 [AArch64] Fix STG instruction being moved past memcpy (#117191)
When merging STG instructions used for AArch64 stack tagging, we were
stopping on reaching a load or store instruction, but not calls, so it
was possible for an STG to be moved past a call to memcpy.
 
This test case (reduced from fuzzer-generated C code) was the result of
StackColoring merging allocas A and B into one stack slot, and
StackSafetyAnalysis proving that B does not need tagging, so we end up
with tagged and untagged objects in the same stack slot. The tagged
object (A) is live first, so it is important that it's memory is
restored to the background tag before it gets reused to hold B.
2024-12-03 10:32:52 +00:00

204 KiB