<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95928>95928</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang-19 crashed: fatal error: error in backend: Stack realignment in presence of dynamic allocas is not supported withthis calling convention.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
iamanonymouscs
</td>
</tr>
</table>
<pre>
Clang-19 crashed when attribute `preserve_none` is enabled and compiled with `-fsanitize=address`.
Compiler explorer(assertion trunck): https://godbolt.org/z/sar6bcP3d
```
$cat mutant.c
void a();
__attribute__((preserve_none)) int b() {
int c;
a(&c);
}
$clang-19 -fsanitize=address mutant.c
mutant.c:4:4: warning: passing arguments to 'a' without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
4 | a(&c);
| ^
mutant.c:5:1: warning: non-void function does not return a value [-Wreturn-type]
5 | }
| ^
fatal error: error in backend: Stack realignment in presence of dynamic allocas is not supported withthis calling convention.
clang-19: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 19.0.0 (++20240301064251+dd426fa5f931-1~exp1~20240301184412.1845)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin
clang-19: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-19: note: diagnostic msg: /tmp/mutant-e3f4cd.c
clang-19: note: diagnostic msg: /tmp/mutant-e3f4cd.sh
clang-19: note: diagnostic msg:
********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEVU1v2zgT_jX0ZSBDoj4sHXyw46gtELwp2hQ9BiNyJPOtRAok5SQ99LcvKNlut-kCi-0CGyiyOOR8Pc8MB51TnSbasnzP8sMKJ380dqtwQG30y2AmJ9yqMfJle9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