Issue |
126882
|
Summary |
MicroBenchmarks/LCALS/SubsetCRawLoops/lcalsCRaw.test
|
Labels |
test-suite
|
Assignees |
|
Reporter |
rorth
|
When running the LLVM 20.1.0 rc[12] reltest on Solaris/sparcv9 and Linux/sparc64, a new failure occured:
```
+ test-suite :: MicroBenchmarks/LCALS/SubsetCRawLoops/lcalsCRaw.test
```
Running the test under `gdb` shows
```
Thread 2 received signal SIGBUS, Bus error.
[Switching to Thread 1 (LWP 1)]
0x0000000100043e00 in benchmark::State::FinishKeepRunning() ()
(gdb) bt
#0 0x0000000100043e00 in benchmark::State::FinishKeepRunning() ()
#1 0x000000010007db54 in benchmark::internal::BenchmarkInstance::Run(unsigned long, int, benchmark::internal::ThreadTimer*, benchmark::internal::ThreadManager*, benchmark::internal::PerfCountersMeasurement*) const ()
#2 0x00000001000688e0 in benchmark::internal::(anonymous namespace)::RunInThread(benchmark::internal::BenchmarkInstance const*, unsigned long, int, benchmark::internal::ThreadManager*, benchmark::internal::PerfCountersMeasurement*) ()
#3 0x0000000100068338 in benchmark::internal::BenchmarkRunner::DoNIterations()
()
#4 0x00000001000690e0 in benchmark::internal::BenchmarkRunner::DoOneRepetition() ()
#5 0x0000000100044c0c in benchmark::RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*, benchmark::BenchmarkReporter*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
#6 0x000000010004428c in benchmark::RunSpecifiedBenchmarks() ()
#7 0x0000000100021648 in main ()
: x/i $pc
=> 0x100043e00 <_ZN9benchmark5State17FinishKeepRunningEv+60>: clrx [ %i0 ]
(gdb) p/x $i0
$1 = 0x10002297c
```
The `clrx`/`stx` insn requires double-word (64-bit) alignment. More context is like this:
```
0x100043dec <_ZN9benchmark5State17FinishKeepRunningEv+40>: cmp %i1, 0
0x100043df0 <_ZN9benchmark5State17FinishKeepRunningEv+44>:
bne %icc, 0x100043e00 <_ZN9benchmark5State17FinishKeepRunningEv+60>
0x100043df4 <_ZN9benchmark5State17FinishKeepRunningEv+48>: nop
0x100043df8 <_ZN9benchmark5State17FinishKeepRunningEv+52>:
call 0x100042f3c <_ZN9benchmark5State11PauseTimingEv>
0x100043dfc <_ZN9benchmark5State17FinishKeepRunningEv+56>: mov %i0, %o0
=> 0x100043e00 <_ZN9benchmark5State17FinishKeepRunningEv+60>: clrx [ %i0 ]
```
The above corresponds to `MicroBenchmarks/libs/benchmark/src/benchmark.cc`:
```
void State::FinishKeepRunning() {
BM_CHECK(started_ && (!finished_ || error_occurred_));
if (!error_occurred_) {
PauseTiming();
}
// Total iterations has now wrapped around past 0. Fix this.
total_iterations_ = 0;
```
Apparently, `total_iterations_` isn't aligned properly.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs