Jump to content
  • Advertisement
Sign in to follow this  
_psi

Bizarre Assembler Behaviour?

This topic is 5043 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, just wondering if anyone could help me with this - i dont understand at all whats going on : the following code prepeares some stuff in eax and then writes it to my local memory space, which i've set up to be accessed using ebp so straight from the debugger: 00532067 03 45 20 add eax,dword ptr [ebp+20h] 0053206A 03 45 34 add eax,dword ptr [ebp+34h] 0053206D 89 85 94 00 00 00 mov dword ptr [ebp+94h],eax 00532073 89 85 94 00 00 00 mov dword ptr [ebp+94h],eax 00532079 89 85 94 00 00 00 mov dword ptr [ebp+94h],eax the strange thing is that the first mov instruction writes eax to a *different* memory location (actually ebp+EAh) then the second (and third) one, which do it right (write to ebp+94h) Does anyone know what's going on ?? Cheers, Mike

Share this post


Link to post
Share on other sites
Advertisement
Two possibilities (as I can think of):

a) EBP changes without any visible reason :)
b) You manage to write to your code section at some point.
Probably stack or buffer overflow.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!