Open rptb1 opened 1 year ago
Could you please try 16 or main
branch?
Could you please try 16 or
main
branch?
Good news and bad news.
No false positives from the same test case in a fresh LXD Ubuntu container with LLVM 16 installed according to https://apt.llvm.org/ :
root@llvm-16:~/mps/code# llvm-diff-16 --version
llvm-diff-16 --version
Ubuntu LLVM version 16.0.0
Optimized build.
root@llvm-16:~/mps/code# clang-16 -S -emit-llvm trace.c
root@llvm-16:~/mps/code# llvm-diff-16 trace.ll trace.ll
root@llvm-16:~/mps/code# echo $?
0
However, I thought I'd try compiling every source file as a test:
root@llvm-16:~/mps/code# for f in *.c; do clang-16 -S -emit-llvm $f; done
[various unimportant errors from sources intended for other platforms]
root@llvm-16:~/mps/code# for f in *.ll; do llvm-diff-16 $f $f || echo $f; done
Segmentation fault (core dumped)
djbench.ll
Segmentation fault (core dumped)
gcbench.ll
Segmentation fault (core dumped)
mps.ll
Segmentation fault (core dumped)
protocol.ll
I ran llvm.sh 17
to install that too. Same results.
root@llvm-16:~/mps/code# for f in *.c; do clang-17 -S -emit-llvm $f; done
...
root@llvm-16:~/mps/code# for f in *.ll; do llvm-diff-17 $f $f || echo $f; done
Segmentation fault (core dumped)
djbench.ll
Segmentation fault (core dumped)
gcbench.ll
Segmentation fault (core dumped)
mps.ll
Segmentation fault (core dumped)
protocol.ll
root@llvm-16:~/mps/code# llvm-diff-17 --version
Ubuntu LLVM version 17.0.0
Optimized build.
The llvm-diff tool produces a false positive result when comparing some files with themselves. That is,
llvm-diff X X
outputs differences and exits with code 1.I have observed this in both version 14 and 15.
Here is a quick repro and example, including detailed version info.