<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/82450>82450</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
extremely minimal compile with -fsanitize=address creates faulty executable
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Phildo
</td>
</tr>
</table>
<pre>
windows 11
clang 17.0.3 (installed via VisualStudio Community 2022)
main.cpp:
```
int main(int argc, char** argv)
{}
```
or
```
#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, PSTR cmdline, int cmdshow)
{ }
```
compiled with:
`clang -fsanitize=address main.cpp`
or
`clang++ -fsanitize=address main.cpp`
running the resulting executable outputs:
```
==22088==interception_win: unhandled instruction at 0x7ff649f1efb3: 4c 8d 15 46 10 f5 ff 49
AddressSanitizer: CHECK failed: sanitizer_common_interceptors_memintrinsics.inc:239 "((__interception::real_memcpy)) != (0)" (0x0, 0x0) (tid=3232)
<empty stack>
```
(I also get the same error when using `-fsanitize=address` on my significant c++ project, but this is the literal minimal repro lol).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVF9v66gT_TTkZVQLg__lwQ9p0upWP_2q6rba1T5FBHA8uxgswE2zn36FneRWVVdaybI9AzPMOXMGEQIerdYtKe9JuVuJKfbOty89GuVWB6fO7QmtcqcAeU7ojtCNNMIeIa8zmnEgrEEbojBGK3hHAb9hmIR5jZNCB1s3DJPFeAZGGSNsvWRY3oNAm8lxJPziIBW9PLMJaCOkTfMZEYQ_SsK2IHvhCdsQtkmu91tWIPU9qXdX40sy579fIIyjlWZSGgjfXrBmPeEPy3o6efPy9PD89vMP-B3t_5eCfjw9v75tnrcP0D_ZEFNdX1wvXr8n98vr20-QgzJodbJTQjmo0LvTL0Lqe7iV_rXAhXQ3jJg4PmHsPzO2dOOuC8JixL814TuhlNchw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