[PATCH] D151308: -fsanitize=function: fix alignment fault on Arm targets.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 24 14:11:45 PDT 2023


MaskRay accepted this revision.
MaskRay added a comment.

LGTM.



================
Comment at: clang/test/CodeGen/ubsan-function.cpp:4
 // RUN: %clang_cc1 -triple aarch64_be-linux-gnu -emit-llvm -o - %s -fsanitize=function -fno-sanitize-recover=all | FileCheck %s
+// RUN: %clang_cc1 -triple arm-none-eabi -emit-llvm -o - %s -fsanitize=function -fno-sanitize-recover=all | FileCheck %s --check-prefixes=CHECK,ARM
 
----------------
Consider using `--check-prefixes=CHECK,64` for 64-bit targets and `--check-prefixes=CHECK,ARM` (or `,32`) for the `// CHECK: call void @__ubsan_handle_function_type_mismatch_abort(ptr @[[#]], {{i64|i32}} %[[#]]) #[[#]], !nosanitize` line below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151308



More information about the cfe-commits mailing list