[all-commits] [llvm/llvm-project] aefb2e: [hwasan] work around lifetime issue with setjmp.

Florian Mayer via All-commits all-commits at lists.llvm.org
Tue Feb 1 12:14:40 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aefb2e134dd715c2c48a7b826d2d56db51ce63ac
      https://github.com/llvm/llvm-project/commit/aefb2e134dd715c2c48a7b826d2d56db51ce63ac
  Author: Florian Mayer <fmayer at google.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    A compiler-rt/test/hwasan/TestCases/use-after-scope-setjmp.cpp
    M llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
    A llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope-setjmp.ll

  Log Message:
  -----------
  [hwasan] work around lifetime issue with setjmp.

setjmp can return twice, but PostDominatorTree is unaware of this. as
such, it overestimates postdominance, leaving some cases (see attached
compiler-rt) where memory does not get untagged on return. this causes
false positives later in the program execution.

this is a crude workaround to unblock use-after-scope for now, in the
longer term PostDominatorTree should bemade aware of returns_twice
function, as this may cause problems elsewhere.

Reviewed By: eugenis

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




More information about the All-commits mailing list