From ccd20652bc4c7b9ab1878f5dcc0886d40d9a17c9 Mon Sep 17 00:00:00 2001 From: Justin Cohen Date: Mon, 18 Mar 2024 12:47:58 -0400 Subject: [PATCH] ios: Update exception test for Chromium release builds. After https://crrev.com/c/5375084, Chromium __libcpp_verbose_abort is handled differently for official non-dcheck builds. This change fixes the test expectation for release non-official builds. Bug: 330168249 Change-Id: Iceb6d327f9e93fd366cc07abe27eefd1adf06472 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5378380 Reviewed-by: Mark Mentovai Commit-Queue: Justin Cohen --- test/ios/crash_type_xctest.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/ios/crash_type_xctest.mm b/test/ios/crash_type_xctest.mm index 1b3b5671..a76f686e 100644 --- a/test/ios/crash_type_xctest.mm +++ b/test/ios/crash_type_xctest.mm @@ -177,7 +177,10 @@ bool IsMacOSVersion143OrGreaterAndiOS16OrLess() { [rootObject_ crashException]; // After https://reviews.llvm.org/D141222 exceptions call // __libcpp_verbose_abort, which Chromium sets to `brk 0` in release. -#if defined(CRASHPAD_IS_IN_CHROMIUM) && defined(NDEBUG) + // After https://crrev.com/c/5375084, Chromium does not set `brk 0` for local + // release builds and official DCHECK builds. +#if defined(CRASHPAD_IS_IN_CHROMIUM) && defined(NDEBUG) && \ + defined(OFFICIAL_BUILD) && !defined(DCHECK_ALWAYS_ON) [self verifyCrashReportException:SIGABRT]; #else [self verifyCrashReportException:EXC_SOFT_SIGNAL];