We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
os_fault
1 parent 2882400 commit 9c29b62Copy full SHA for 9c29b62
libcxx/src/log_error.cpp
@@ -16,6 +16,7 @@ extern "C" void android_set_abort_message(const char* msg);
16
#endif // __BIONIC__
17
18
#if defined(__APPLE__) && __has_include(<os/reason_private.h>)
19
+# include <TargetConditionals.h>
20
# include <os/reason_private.h>
21
#endif
22
@@ -28,7 +29,7 @@ void log_security_failure(const char* message) noexcept {
28
29
fputs(message, stderr);
30
31
// On Apple platforms, use the `os_fault_with_payload` OS function that simulates a crash.
-#if defined(__APPLE__) && __has_include(<os/reason_private.h>)
32
+#if defined(__APPLE__) && __has_include(<os/reason_private.h>) && !TARGET_OS_SIMULATOR
33
os_fault_with_payload(
34
/*reason_namespace=*/OS_REASON_SECURITY,
35
/*reason_code=*/0,
0 commit comments