Memory overwritten

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Arioch82
Posts: 1
Joined: Tue Jul 25, 2006 10:48 pm

Memory overwritten

Post by Arioch82 »

hi all, this is my first post here :)

i've memory overwritten problem, target code is:

Code: Select all

requestParam = param;
-       0x89003e8:		lw	v1,0(s8)
-	0x89003ec:		lw	v0,12(s8)
-	0x89003f0:		sw	v0,20(v1)
requested = (GAMEPROCESS *)x;
-	0x89003f4:		lw	v1,0(s8)
-	0x89003f8:		lw	v0,4(s8)
-	0x89003fc:		sw	v0,8(v1)
requestmode = mode;
-	0x8900400:		lw	v1,0(s8)
-	0x8900404:		lbu	v0,8(s8)
-	0x8900408:		sb	v0,24(v1)
if (!requested)
-	0x890040c:		lw	v0,0(s8)
-	0x8900410:		lw	v0,8(v0)
-	0x8900414:		bnez	v0,0x890042c 
-	0x8900418:		nop
  requested = pending;
-	0x890041c:		lw	v0,0(s8)
-	0x8900420:		lw	v1,0(s8)
-	0x8900424:		lw	v1,12(v1)
-	0x8900428:		sw	v1,8(v0)
simply 3 assignment and 1 if.

problem occur when third assignment is done (i've also tried to exchange it with one of previous assignment and problem persist), particulary when sb/sw instruction is executed; sb/sw simple write byte/word value on specified memory address... or this is what it should do... instead of this i've that various address location are modified!

is this possible?

i've included last if in code because i think that can be it the "bastard-thing" for caching on branch or... ... ...i've just suppose it, i've no idea :°

anyone can help me?

thanks, and sorry for my bad english (i'm italian)
Post Reply