[all-commits] [llvm/llvm-project] 2213bd: [sanitizer_common] Fix signal_line.cpp on SPARC (#...

Rainer Orth via All-commits all-commits at lists.llvm.org
Sun Aug 4 02:21:45 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 2213bdeb0077d6e89344950568bb321fdef50a86
      https://github.com/llvm/llvm-project/commit/2213bdeb0077d6e89344950568bb321fdef50a86
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2024-08-04 (Sun, 04 Aug 2024)

  Changed paths:
    M compiler-rt/test/sanitizer_common/TestCases/Linux/signal_line.cpp

  Log Message:
  -----------
  [sanitizer_common] Fix signal_line.cpp on SPARC (#100535)

```
  SanitizerCommon-ubsan-sparc-Linux :: Linux/signal_line.cpp
```
currently `FAIL`s on Linux/sparc64 (32 and 64-bit) for `n == 2`. Instead
of the expected `SIGSEGV`, the test dies with `SIGBUS`. `strace` reveals
that this is due to a unaligned access:
```
--- SIGBUS {si_signo=SIGBUS, si_code=BUS_ADRALN, si_addr=0x1} ---
```
which is to be expected on a strict-alignment target like SPARC. Fixed
by changing the invalid pointer to be better aligned.

Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`.

(cherry picked from commit 94394ca980f8ecbd845155d2170cfd865e4d62dc)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list