<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57231>57231</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Investigate mlir test failing with HWASAN
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir:core,
compiler-rt:hwasan
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
vitalybuka
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vitalybuka
</td>
</tr>
</table>
<pre>
I can be a bug in HWASAN, or JIT needs to be aware of the sanitizer.
MLIR :: mlir-cpu-runner/async-error.mlir
MLIR :: mlir-cpu-runner/async-group.mlir
MLIR :: mlir-cpu-runner/async-value.mlir
MLIR :: mlir-cpu-runner/async.mlir
```
FAIL: MLIR :: mlir-cpu-runner/async.mlir (64485 of 66700)
******************** TEST 'MLIR :: mlir-cpu-runner/async.mlir' FAILED ********************
Script:
--
: 'RUN: at line 1'; /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-opt /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/test/mlir-cpu-runner/async.mlir -pass-pipeline="async-to-async-runtime,func.func(async-runtime-ref-counting,async-runtime-ref-counting-opt),convert-async-to-llvm,func.func(convert-linalg-to-loops,convert-scf-to-cf),convert-linalg-to-llvm,convert-memref-to-llvm,func.func(convert-arith-to-llvm),convert-func-to-llvm,reconcile-unrealized-casts" | /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-cpu-runner -e main -entry-point-result=void -O0 -shared-libs=/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/libmlir_c_runner_utils.so -shared-libs=/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/libmlir_runner_utils.so -shared-libs=/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/libmlir_async_runtime.so | /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/test/mlir-cpu-runner/async.mlir
--
Exit Code: 2
Command Output (stderr):
--
==95300==ERROR: HWAddressSanitizer: tag-mismatch on address 0xffffb20197d0 at pc 0xffffb207d8d8
READ of size 1 at 0xffffb20197d0 tags: 90/00 (ptr/mem) in thread T0
#0 0xffffb207d8d8 in djbHash /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/Support/DJB.h:22:24
#1 0xffffb207d8d8 in llvm::StringMapImpl::LookupBucketFor(llvm::StringRef) /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/lib/Support/StringMap.cpp:87:28
#2 0xffffb2079d64 in std::__1::pair<llvm::StringMapIterator<void*>, bool> llvm::StringMap<void*, llvm::MallocAllocator>::try_emplace<>(llvm::StringRef) /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/ADT/StringMap.h:330:25
#3 0xffffb2078268 in operator[] /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/ADT/StringMap.h:242:47
#4 0xffffb2078268 in operator()<void (*)(void *, long)> /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/lib/ExecutionEngine/AsyncRuntime.cpp:477:5
#5 0xffffb2078268 in __mlir_runner_init /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/lib/ExecutionEngine/AsyncRuntime.cpp:480:3
#6 0xaaaab667bfbc in compileAndExecute((anonymous namespace)::Options&, mlir::ModuleOp, llvm::StringRef, (anonymous namespace)::CompileAndExecuteConfig, void**) /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/lib/ExecutionEngine/JitRunner.cpp:194:5
#7 0xaaaab6679770 in compileAndExecuteVoidFunction((anonymous namespace)::Options&, mlir::ModuleOp, llvm::StringRef, (anonymous namespace)::CompileAndExecuteConfig) /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/lib/ExecutionEngine/JitRunner.cpp:250:10
#8 0xaaaab66768c8 in mlir::JitRunnerMain(int, char**, mlir::DialectRegistry const&, mlir::JitRunnerConfig) /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/lib/ExecutionEngine/JitRunner.cpp:383:23
#9 0xaaaab5edef58 in main /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp:33:10
#10 0xffffbea573f8 (/lib/aarch64-linux-gnu/libc.so.6+0x273f8) (BuildId: f37f3aa07c797e333fd106472898d361f71798f5)
#11 0xffffbea574c8 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x274c8) (BuildId: f37f3aa07c797e333fd106472898d361f71798f5)
#12 0xaaaab5eb832c in _start (/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/mlir-cpu-runner+0x186832c)
Thread: T0 0xeffe00002000 stack: [0xffffd8907000,0xffffd9107000) sz: 8388608 tls: [0xffffbef9cde0,0xffffbef9de80)
Thread: T1 0xeffe00006000 stack: [0xffffb6430000,0xffffb6c2ef60) sz: 8384352 tls: [0xffffb6c2ef60,0xffffb6c30000)
Thread: T2 0xeffe0000a000 stack: [0xffffbc4f0000,0xffffbcceef60) sz: 8384352 tls: [0xffffbcceef60,0xffffbccf0000)
Thread: T3 0xeffe0000e000 stack: [0xffffb43f0000,0xffffb4beef60) sz: 8384352 tls: [0xffffb4beef60,0xffffb4bf0000)
Thread: T4 0xeffe00012000 stack: [0xffffb2bc0000,0xffffb33bef60) sz: 8384352 tls: [0xffffb33bef60,0xffffb33c0000)
Thread: T5 0xeffe00016000 stack: [0xffffbcd00000,0xffffbd4fef60) sz: 8384352 tls: [0xffffbd4fef60,0xffffbd500000)
Thread: T6 0xeffe0001a000 stack: [0xffffb23b0000,0xffffb2baef60) sz: 8384352 tls: [0xffffb2baef60,0xffffb2bb0000)
Thread: T7 0xeffe0001e000 stack: [0xffffba4b0000,0xffffbacaef60) sz: 8384352 tls: [0xffffbacaef60,0xffffbacb0000)
Thread: T8 0xeffe00022000 stack: [0xffffb9490000,0xffffb9c8ef60) sz: 8384352 tls: [0xffffb9c8ef60,0xffffb9c90000)
Thread: T9 0xeffe00026000 stack: [0xffffb5c20000,0xffffb641ef60) sz: 8384352 tls: [0xffffb641ef60,0xffffb6420000)
Thread: T10 0xeffe0002a000 stack: [0xffffbacc0000,0xffffbb4bef60) sz: 8384352 tls: [0xffffbb4bef60,0xffffbb4c0000)
Thread: T11 0xeffe0002e000 stack: [0xffffb9ca0000,0xffffba49ef60) sz: 8384352 tls: [0xffffba49ef60,0xffffba4a0000)
Thread: T12 0xeffe00032000 stack: [0xffffbb4d0000,0xffffbbccef60) sz: 8384352 tls: [0xffffbbccef60,0xffffbbcd0000)
Thread: T13 0xeffe00036000 stack: [0xffffbbce0000,0xffffbc4def60) sz: 8384352 tls: [0xffffbc4def60,0xffffbc4e0000)
Thread: T14 0xeffe0003a000 stack: [0xffffb7c60000,0xffffb845ef60) sz: 8384352 tls: [0xffffb845ef60,0xffffb8460000)
Thread: T15 0xeffe0003e000 stack: [0xffffb6c40000,0xffffb743ef60) sz: 8384352 tls: [0xffffb743ef60,0xffffb7440000)
Thread: T16 0xeffe00042000 stack: [0xffffb33d0000,0xffffb3bcef60) sz: 8384352 tls: [0xffffb3bcef60,0xffffb3bd0000)
Thread: T17 0xeffe00046000 stack: [0xffffb8c80000,0xffffb947ef60) sz: 8384352 tls: [0xffffb947ef60,0xffffb9480000)
Thread: T18 0xeffe0004a000 stack: [0xffffb7450000,0xffffb7c4ef60) sz: 8384352 tls: [0xffffb7c4ef60,0xffffb7c50000)
Thread: T19 0xeffe0004e000 stack: [0xffffb5410000,0xffffb5c0ef60) sz: 8384352 tls: [0xffffb5c0ef60,0xffffb5c10000)
Thread: T20 0xeffe00052000 stack: [0xffffb8470000,0xffffb8c6ef60) sz: 8384352 tls: [0xffffb8c6ef60,0xffffb8c70000)
Thread: T21 0xeffe00056000 stack: [0xffffb3be0000,0xffffb43def60) sz: 8384352 tls: [0xffffb43def60,0xffffb43e0000)
Thread: T22 0xeffe0005a000 stack: [0xffffb4c00000,0xffffb53fef60) sz: 8384352 tls: [0xffffb53fef60,0xffffb5400000)
HWAddressSanitizer can not describe address in more detail.
Memory tags around the buggy address (one tag corresponds to 16 bytes):
0xfffefb2018f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb201900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb201910: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb201920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb201930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb201940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb201950: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb201960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0xfffefb201970: 00 00 00 00 00 00 00 00 00 00 00 00 00 [00] 00 00
0xfffefb201980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb201990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb2019a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb2019b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb2019c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb2019d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb2019e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0xfffefb2019f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Tags for short granules around the buggy address (one tag corresponds to 16 bytes):
0xfffefb201960: .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
=>0xfffefb201970: .. .. .. .. .. .. .. .. .. .. .. .. .. [..] .. ..
0xfffefb201980: .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
See https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html#short-granules for a description of short granule tags
Registers where the failure occurred (pc 0xffffb207d8d8):
x0 9000ffffb20197d0 x1 3500efe4ffff1580 x2 0000000000000000 x3 0000000000000000
x4 0000000000000004 x5 0000000000000014 x6 0000ffffd8907000 x7 0000000000000001
x8 0000000000000001 x9 0000000000000000 x10 0000000000000000 x11 0000000000000053
x12 000000000000000c x13 0000efe4ffff15e0 x14 0000000000000000 x15 0000000000000069
x16 0000aaaab5ec3e74 x17 0000000000000000 x18 0000000000000004 x19 0000000000000016
x20 0200efff00000000 x21 9000ffffb20197d0 x22 1d00ffffd9104460 x23 1d00ffffd9104468
x24 9000ffffb20197d0 x25 0d00ffffd9104720 x26 9d00ffffd910442c x27 8d00ffffd910448c
x28 0d00ffffd9104718 x29 0000ffffd91040e0 x30 0000ffffb207d8dc sp 0000ffffd91040c0
SUMMARY: HWAddressSanitizer: tag-mismatch /b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/Support/DJB.h:22:24 in djbHash
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNWt1zm7oS_2ucFw0ekPh8yIOTONN0mtM7Sc69c588QgibUwwMiDY5f_3ZBQyCmF63jZvrcRx72V399kOrFSjMo5fLOyJ4RkJJOAnrLUky8uE_q8fVHwt6TfKSfLx7IpmUUUVU3nB946UkeUzUTpKKZ4lK_pblcmHeLMxV-0nI_ae7B7JgK3iTfZqUhihqo6yzTJYLesurl0wYsizzcolXf0RqW-Z18cNSX3layx-V0vhHn67ZvZuft6u7T6jkVIVkQX3Xtn0Hfei6nmkuaNBppj__Jk_rxyf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