[PATCH] D60806: [HWASan] Added no-FP unit test for register dump.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 17:26:04 PDT 2019


eugenis added inline comments.


================
Comment at: compiler-rt/test/hwasan/TestCases/register-dump-no-fp.cc:2
+// RUN: %clangxx_hwasan -ffixed-x10 -ffixed-x20 -ffixed-x27 \
+// RUN:   -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -O0 %s -o %t && \
+// RUN:   not %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
----------------
You are testing the case when f() does NOT have a frame pointer - why add these flags? 


================
Comment at: compiler-rt/test/hwasan/TestCases/register-dump-no-fp.cc:44
+// CHECK: Registers where the failure occurred
+// CHECK-NEXT: x0{{[ ]+[0-9a-f]{16}[ ]}}x1{{[ ]+[0-9a-f]{16}[ ]}}x2{{[ ]+[0-9a-f]{16}[ ]}}x3{{[ ]+[0-9a-f]{16}$}}
+// CHECK-NEXT: x4{{[ ]+[0-9a-f]{16}[ ]}}x5{{[ ]+[0-9a-f]{16}[ ]}}x6{{[ ]+[0-9a-f]{16}[ ]}}x7{{[ ]+[0-9a-f]{16}$}}
----------------
pcc wrote:
> Maybe don't try to match this part since you're already matching for them in `register-dump-read.c`.
Right. Just test that main() is in the stack trace, nothing more.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60806/new/

https://reviews.llvm.org/D60806





More information about the llvm-commits mailing list