-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Missing Stack Variable #261
Comments
memcpy(&sp10, data, 0x10); // copy 16 bytes from data into sp10 -> sp10 must be at least 16 bytes big, e.g. u8 sp10[16];
memcpy(&sp8, &sp10, 4); // copy 4 bytes from sp10 into sp8 -> sp8 must be at least 4 bytes big, e.g. u8 sp8[4]; This means that temp_r0_2 = (sp8 << 8) | sp9; would be temp_r0_2 = (sp8[0] << 8) | sp8[1]; Are you expecting m2c to create a variable for |
#235 fixes this by adding a variable declaration for sp9, but I never landed it because on review I started feeling like m2c should do something smarter when it detects stack variables that never get written to/addresses taken. |
Bug
In the decompilation, you see this line:
but the variable
sp9
its never declared.Decompilation
Assembly:
Context
The text was updated successfully, but these errors were encountered: