[MSAN][regression] compilation freezes with -fsanitize-memory-track-origins
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Hello,
For the past few days, the MSAN compilation has been freezing on the following code. The last known working build was `Ubuntu clang version 22.0.0 (++20251113081817+83118de72238-1~exp1~20251113201939.1288)` from `https://apt.llvm.org/`.
`clang -c -fsanitize=memory -fsanitize-memory-track-origins -O2 c.c`
``` c
long stride;
int comb_c(unsigned char *a, unsigned char *b) {
int comb = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 8; j++) {
comb += (((a[j] << 1) - b[j - stride] - b[j]) ^
((a[j] << 1) - b[j - stride] - b[j]) >> 31) -
(((a[j] << 1) - b[j - stride] - b[j]) >> 31) +
((((b[j] << 1) - a[j] - a[j + stride]) ^
((b[j] << 1) - a[j] - a[j + stride]) >> 31) -
(((b[j] << 1) - a[j] - a[j + stride]) >> 31));
}
a += stride;
b += stride;
}
return comb;
}
```
Thanks,
Kacper
Contributor guide
Research direction
Reproduce the freeze with the provided c.c reduction and the exact clang command, comparing it with the last known working Ubuntu clang build. Trace the MSAN compilation path for -fsanitize-memory-track-origins and confirm the command completes without freezing on the supplied code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100