<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62480>62480</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
no debug info for stack guard checks
</td>
</tr>
<tr>
<th>Labels</th>
<td>
debuginfo
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nickdesaulniers
</td>
</tr>
</table>
<pre>
Consider the following:
```c
// clang -fstack-protector-strong -O2 -mstack-protector-guard-reg=gs -mstack-protector-guard-symbol=__stack_chk_guard -fno-pie -g
void foo (int*);
void bar (int x) {
int y [x];
foo(y);
}
```
It looks like the following assembler is lacking debug info:
```
movq __stack_chk_guard@GOTPCREL(%rip), %rbx
movq %gs:(%rbx), %rax
movq %rax, -16(%rbp)
...
callq __stack_chk_fail@PLT
```
This is more easily visible in godbolt: https://godbolt.org/z/cnozfa15E
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U01v4jAQ_TWTyyjIcT4IhxwolNVKlVqteke24yRenJjaDgv99SuHdNvSLkKyxvPmzcvzDHNOtYOUFeR3kG8jNvrO2GpQ4lBLx0Y9KGldxE19qTZmcKqWFn0nsTFamz9qaCFdA9kCWUNBrn8xx3QHdIdCs6HFuHGeiUN8tMZL4Y2NnbcmJB4pxv1tsh2ZrWMrW0i3rfsvwF16bjSk2_1-AuxFd9hPKYybwcRHJTFur3JORtXYGINASzV4oGugK0jvZrHvGM7sjMEz0BXCcsYgIobbC0J-d4Z8-6868AItL58Yl9sbX67hT4_amINDrQ7ys5XInJM919KicqiZOITLWvKxRTU05qvV78LCrzenl3B-cQMy8uPx-Wnz6_4BaAk0t-oYtNINhoCfZ543AqB560K3K5ifP4DZ-fumc45uME6Kt8KpywRfLBZznWBav9yobJjSkJGnh-dvP_C5Uy5Y0hsrUTKn9AVPyimuJaoBW1Nzoz2ka-y8P16Vh-GbEwtjW6C7V6A7MZjXhiX5fVRXab1KVyySVVKUdFUkhJRRVyUpSyXnybIQebqipawzWa8KUecly0iWRKqihKYkJ0myDDWLuigTupSCLyVhTU0hI7JnSi-0PvWhd6ScG2VV0KwkkWZcajftG6XT205PS2lYP1uFmpiPrYOMaOW8e2fxymtZDebDRGBjLE424nXsRSfFwUWj1dWNFcp3I18I0wPdBcr5CDv1WwoPdDepdEB3k9C_AQAA__-M6T38">