<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58503>58503</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
ASAN mode hangs on arm64 macOS
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
xiejw
</td>
</tr>
</table>
<pre>
I sync to head and recompile llvm every week.
Roughly, noticed this problem since last week on master branch. I tried to sync to head today and recompile. Hit the same issue
```
clang version 16.0.0 (https://github.com/llvm/llvm-project.git b1e5e81efda4c020a990dc749ef8bfb8bd4b763c)
Target: arm64-apple-darwin21.6.0
Thread model: posix
```
Repro is quite easy
1. `main.c`
```
#include <stdio.h>
int main() {
printf("Hello");
return 0;
}
```
2. compile and run
```
clang -lm -std=c11 -fsanitize=address -g main.c
# hang
ASAN_OPTIONS=detect_leaks=1 ./a.out
```
3. If run without ASAN, no issue
```
clang -lm -std=c11 -fsanitize=address -g main.c
# ok
./a.out
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylU01vnDAQ_TVwGa3FN-yBQ5JtlVySqsk9MvYATgze2iab7a_vwJKmidpUVVdowZ6v92beNEYe6ytwx1GAN9Ajl8BHCRaFGfZKI2j9NAA-oT3CAfGRBdEuiM5O_1_N1PX6GCQXMBqvBErwvXKwt6bROIBTo6AM3PklFswIAx3QQmP5KHoGV-CtmsPMWwzeSH58i4TBpfKUH8HxAUE5N-EKpojWZzkKzccOCLFTVDAuWMQiCJKq937vgvQsSD7T0ynfTw2j5HSYSa6vDYF_QOEZOUATY45VjK3kmYiSiG-3kRRltsW2atqmamTWlEUqgmR7qn3HbYeeigC3Q5Ft-H6vcSO5PagxiRlhWf16O9McjEQ9e--NU8-_ZbN2GgkWcYZvk_IIyN3xZIgZkOvA1cjEa8y7FElKg9CTRAjSC-elMqwP0k-_FlCjhzkL9YnIQFCen-5h_e0tebSLNblErQ29Z9bpOz-LfrIjRD8NQbn7gFfC4EVoy7Cn8YORbvQAG4IfpDsRx1Rs0zo-Kq--I11xKS06R7cdwNqQF_rQU_zpdHZ7dn1_8-Xu6ub6lqIkehr2vUb-SNrYxcBIB5yZyX-AOiXhtjNYOJCKyBfmrKc1-Ksw_4OFeTx9_wljiHVcFEVSVtm2CGWdym265aFXXmM9Q1wEtzTDzcu4aJSqiJvbcLK6_rcNoePC1dFHXuVRGvZ1m7XlNqlk2UZRkhVSFlgJjItGtrzJSxFq3qB2dZCfk4BGPKztIjHlu1DVSZQkMS1anEcVbW7elFWRy6ISsspRtEEWITVFsxkHM7YLbb1AaqbOkVEr592rkTunuhFxKUf5-UTTsvWzwodDuBSuF-A_AG9_e9k">