[llvm] BPF: Emit an error for illegal LD_imm64 insn when LLVM_ENABLE_ASSERTI… (PR #74035)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 22:23:18 PST 2023


yonghong-song wrote:

It is very strange. I am using the same cmake options.
```
cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja \
    -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" \
    -DLLVM_TARGETS_TO_BUILD="BPF;X86" \
    -DLLVM_ENABLE_ASSERTIONS=OFF \
    -DLLVM_ENABLE_ZLIB=ON \
    -DCMAKE_C_COMPILER=/usr/bin/clang \
    -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
    -DCMAKE_INSTALL_PREFIX=$PWD/install

ninja && ninja install
```
465ab5867fa7 (HEAD -> ed-tmp) debug asm
248446980317 Revert "[BPF] Attribute preserve_static_offset for structs"
e86591b37d4e [flang] Improve procedure interface compatibility checking for dummy … (#72704)
f8a21dff70cc [SPIR-V] Mark currently failing tests as XFAIL (#73858)
...
```
where the top commit is this patch.

Still I got the same failure. My previous initial compiler is not specified and it uses 'gcc' 8.5 on the host.
Explicit specifying clang/clang++ are specified in the above.
```
$ rpm -qf /usr/bin/clang
clang-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64
$ rpm -qf /usr/bin/clang++
clang-15.0.7-1.module_el8.8.0+1258+af79b238.x86_64
```

@4ast, @anakryiko if you got time, could you try as well with your setup with this patch and LLVM_ENABLE_ASSERTIONS=OFF? 

@eddyz87 Could you debug why it didn't error out? That is, why the code path didn't reach printExpr() function and triggers an error?

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


More information about the llvm-commits mailing list