<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/80385>80385</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[tool][objdump] llvm-objdump in arrch32 disassembly without __stack_chk_fail while applying -fstack-protector
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Zhenhang1213
</td>
</tr>
</table>
<pre>
`#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int func()
{
char c = 'b';
char str1[8];
//set
memset(str1, c, 8);
str1[7] = '\0';
//get
printf("str1=%s\n", str1);
return 0;
}
int main()
{
func();
return 0;
}
`
On a 32-bit architecture, when I compile this code into an object file and disassemble it using the objdump tool, the generated assembly instructions do not have the __stack_chk_fail function call, however arrch64 not.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U02v4ygQ_DX40kpEGn8efJjEG2lPe99LhDE27GCIAL8o_34Fk7fjmWjfhShUV5W7uuEh6MVK2ZPqTKqh4FtUzvd_K2kVt8sJT6wY3fTsSU0JMm2F2SYJhF1CnLQ7KsL-IHQg9NsbavT4Bey1Xfbw26lthHmzgmBLsHshzfmzpBOKexBA2AAEm5FgQ9hvaIj-RKpzS6phh70qCF4JXoOM_92sck1_sc08vIBIR3bfKb9EG1INn-akutBf_X_xWHYed69tnHNPmJXYQLAKpLpYgpj8fph372Jexs1boD-RZvg9sJVr-3-B7cLctfOFak338n9Z4MDwMOoI3AuloxRx8zJ980NJC3-CcOtdGwlR6QDCTRK0jQ64BTf-I0WEOaHcTjDpwEOQ62gk6Ahb0HaBqGQqnLb1DtE5k5TT3SKt9DzKCV6cJ2gbot9E1M4GmBxYF0HxD5nrb7cQufh-E-r7beba5DVKpSC4yarKPeSH9MC9F6ouE_1YTD2bOtbxQvanhtZt2SKjheobSpt5wnpmY1ueOlpjUzbdhBJZRStRF7pHiiVFirRklNHjWNP6VLN25shpwzpSUrlybY7GfKxH55dCh7DJvqWsrQrDR2lCfoCIVj4gg2kbqqHwfeIcxm0JpKRGhxh-qkQdTX65Oa1qINX5lV9azkz8zFPbH80yhF34T3joqNwW3zODh8rDut_NMw3nMOeCw927NHjni82bXsV4D4R9ey26jmobj8KtBK_J_vWTSGn-BK-5t0Dwmnv_NwAA__8KU1TG">