[llvm] [RFC] implement convergence control in MIR using SelectionDAG (PR #71785)

Mitch Phillips via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 08:08:23 PST 2024


hctim wrote:

Hi Sameer,

Looks like this broke the sanitizer buildbots: https://lab.llvm.org/buildbot/#/builders/5/builds/41499

```
FAIL: LLVM :: MachineVerifier/verify-implicit-def.mir (2 of 81037)
******************** TEST 'LLVM :: MachineVerifier/verify-implicit-def.mir' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
RUN: at line 2: not --crash /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=none -o /dev/null /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MachineVerifier/verify-implicit-def.mir 2>&1 | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MachineVerifier/verify-implicit-def.mir
+ not --crash /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=none -o /dev/null /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MachineVerifier/verify-implicit-def.mir
+ /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MachineVerifier/verify-implicit-def.mir
--
********************
Testing: 
FAIL: LLVM :: MachineVerifier/test_g_dyn_stackalloc.mir (3 of 81037)
******************** TEST 'LLVM :: MachineVerifier/test_g_dyn_stackalloc.mir' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
RUN: at line 1: not --crash /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llc -mtriple=aarch64 -o /dev/null -run-pass=none -verify-machineinstrs /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MachineVerifier/test_g_dyn_stackalloc.mir 2>&1 | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MachineVerifier/test_g_dyn_stackalloc.mir
+ not --crash /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llc -mtriple=aarch64 -o /dev/null -run-pass=none -verify-machineinstrs /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MachineVerifier/test_g_dyn_stackalloc.mir
+ /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/MachineVerifier/test_g_dyn_stackalloc.mir

```

Looks like there's a memory corruption bug that can be revealed by removing the `-o /dev/null` from the tests.

You can reproduce the bots in full by using the instructions at https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild, but that's not fully necessary in this case. A quick repro is:

```
$ cmake \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_USE_LINKER=lld \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="-fsanitize=address" \
-DCMAKE_CXX_FLAGS="-fsanitize=address" \
-DLLVM_USE_SANITIZER=Address \
/path/to/llvm

$ LIT_OPTS='--filter MachineVerifier' ninja check-llvm

< ... snip ... >
********************                                                                                                      
********************                                                                                                      
Failed Tests (2):                                                                                                         
  LLVM :: MachineVerifier/test_g_dyn_stackalloc.mir                                                                       
  LLVM :: MachineVerifier/verify-implicit-def.mir                                                                         
```


https://github.com/llvm/llvm-project/pull/71785


More information about the llvm-commits mailing list