-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Closed
Labels
Description
[514] % clangtk -v
clang version 15.0.0 (https://github.com/llvm/llvm-project.git 30f1cef86b56e0bae5b78ceed05a7fdbad4959a9)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
[515] %
[515] % clangtk -Os small.c; ./a.out
[516] %
[516] % clangtk -Os -mllvm -enable-constraint-elimination small.c
[517] % ./a.out
Aborted
[518] %
[518] % cat small.c
int a;
unsigned c ;
int main() {
unsigned char e;
int f = 1;
a--;
L:
e = ~c;
if (!f)
while (1)
;
c = ~(e - ~0x30);
if (f > c)
while (1)
;
if (c > 4294967000)
__builtin_abort ();
int h = ~a;
f = a;
if (h)
goto L;
return 0;
}