Created
December 13, 2011 01:31
-
-
Save zah/1469972 to your computer and use it in GitHub Desktop.
volatile stack roots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int main() | |
| { | |
| 009F1000 push ecx | |
| volatile int y; | |
| volatile int z; | |
| void* x; | |
| x = malloc(10); | |
| 009F1001 push 0Ah | |
| 009F1003 call dword ptr [__imp__malloc (9F20A0h)] | |
| y = (int)x; | |
| 009F1009 mov dword ptr [esp+4],eax | |
| z = (int)x; | |
| 009F100D mov dword ptr [esp+4],eax | |
| return (int)(x); | |
| } | |
| 009F1011 add esp,8 | |
| 009F1014 ret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int main() | |
| { | |
| volatile void* y; | |
| volatile void* z; | |
| void* x; | |
| x = malloc(10); | |
| 00D91000 push 0Ah | |
| 00D91002 call dword ptr [__imp__malloc (0D920A0h)] | |
| 00D91008 add esp,4 | |
| y = x; | |
| z = x; | |
| return (int)(x); | |
| } | |
| 00D9100B ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment