diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2026-01-10 12:21:56 +0100 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2026-01-10 12:21:56 +0100 |
| commit | 3e481a3afe1344dbb4a0960f34fc89dcdc9f1d61 (patch) | |
| tree | 9606cd4f686746a547bf31ba2a72777952aacf01 /compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | |
| parent | 294ba569803972323a64670451a82af53c660541 (diff) | |
Vendor import of llvm-project branch release/21.x llvmorg-21.1.8-0-g2078da43e25a, a.k.a. 21.1.8 release.vendor/llvm-project/llvmorg-21.1.8-0-g2078da43e25avendor/llvm-project/release-21.x
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp index 16caf699a4c2..ea5f2e8f8e02 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp @@ -1287,7 +1287,7 @@ uptr GetPageSize() { uptr ReadBinaryName(/*out*/ char *buf, uptr buf_len) { # if SANITIZER_HAIKU - int cookie = 0; + int32_t cookie = 0; image_info info; const char *argv0 = "<UNKNOWN>"; while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) { @@ -1987,7 +1987,10 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const { # elif SANITIZER_NETBSD uptr err = ucontext->uc_mcontext.__gregs[_REG_ERR]; # elif SANITIZER_HAIKU - uptr err = ucontext->uc_mcontext.r13; + uptr err = 0; // FIXME: ucontext->uc_mcontext.r13; + // The err register was added on the main branch and not + // available with the current release. To be reverted later. + // https://github.com/haiku/haiku/commit/11adda21aa4e6b24f71a496868a44d7607bc3764 # elif SANITIZER_SOLARIS && defined(__i386__) const int Err = 13; uptr err = ucontext->uc_mcontext.gregs[Err]; @@ -2617,6 +2620,11 @@ static void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { *pc = ucontext->uc_mcontext.mc_eip; *bp = ucontext->uc_mcontext.mc_ebp; *sp = ucontext->uc_mcontext.mc_esp; +# elif SANITIZER_HAIKU + ucontext_t *ucontext = (ucontext_t *)context; + *pc = ucontext->uc_mcontext.eip; + *bp = ucontext->uc_mcontext.ebp; + *sp = ucontext->uc_mcontext.esp; # else ucontext_t *ucontext = (ucontext_t *)context; # if SANITIZER_SOLARIS |
