@mahkoh I could not reproduce that. Here's what I did:

```bash
clang -fsanitize=address -xc -g - << "EOF"
#include <stdlib.h>

int main() {
  malloc(123);
  return 0;
}
EOF

bash << "EOF"
A=0
B=0

export ASAN_OPTIONS="detect_leaks=1"

for i in $(seq 500); do
    if ./a.out 2> /dev/null; then
        A=$(($A+1))
    else
        B=$(($B+1))
    fi
done

echo "No leak detected $A times"
echo "Leak detected $B times"
EOF
```

and the output:

```
No leak detected 0 times
Leak detected 500 times
```