[compiler-rt] Log errno (or fuchsia equivalent) on map failures (PR #95391)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 11:25:41 PDT 2024
================
@@ -27,4 +31,21 @@ void die(const char *Message) {
__builtin_trap();
#endif // __BIONIC__
}
+
+void dieWithErrorCode(const char *Message, int64_t ErrorCode) {
+#ifdef __BIONIC__
+ if (&android_set_abort_message == nullptr)
+ abort();
+
+ size_t buffer_size = strlen(Message) + 48;
+ char *buffer = static_cast<char *>(alloca(strlen(Message) + 48));
----------------
vitalybuka wrote:
`alloca(buffer_size)`
https://github.com/llvm/llvm-project/pull/95391
More information about the llvm-commits
mailing list