[Darwin][UBSan][Sanitizer] abort_on_error ubsan test fix for arm64
authorBlue Gaston <bgaston2@apple.com>
Tue, 26 Apr 2022 21:33:08 +0000 (14:33 -0700)
committerBlue Gaston <bgaston2@apple.com>
Wed, 27 Apr 2022 19:23:03 +0000 (12:23 -0700)
commit8b574a1e51339e0bf44cd4ded9c704e50ecb5850
treea11534b49ceb9e747236f2bcfc0244df3add06df
parent82aa5e2c6fe9ffbd637d421a799deffa0d90d7bf
[Darwin][UBSan][Sanitizer] abort_on_error ubsan test fix for arm64

The current darwin abort_on_error test specifically tests for a division
by zero undefined behavior. However arm does not trap by default for this
behavior. x86 signals the abort, which is why the test passes on x86.
This patch updates the test to test for a case where the ubsan runtime
specifically calls Die() to trigger an abort by default.

rdar://92108564

Differential Revision: https://reviews.llvm.org/D124480
compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp