You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a very simple C code, and have a variable with size of 1024 bytes. When I build it as a 64bits executable, Ghidra confuses and thinks it's 1032 bytes. When I build a 32bits executable, the size is detected correctly.
I spotted this behavior in x86 64, but I guess it's not limited to it.
I don't think a decompiler can recover the length of a variable very precisely.
For example, there are several consecutive variables on the stack that are only defined but not used.
In addition, the actual stack size may not match the size of the source code after the code is compiled, because the compiler aligns the stack during compilation.
Describe the bug
I have a very simple C code, and have a variable with size of 1024 bytes. When I build it as a 64bits executable, Ghidra confuses and thinks it's 1032 bytes. When I build a 32bits executable, the size is detected correctly.
I spotted this behavior in x86 64, but I guess it's not limited to it.
The code:
Decompiler result:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Having the correct size of 1024 bytes
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: