Posted: Fri Dec 11, 2020 9:59 am Post subject: Strange debug effect
Hi all, after many years of using CE i met some strange debug effect.
I make injection to some instruction and start debug by step (F7). But the write to the variable occurs before debugging will reach my instruction.
this is main part of code
Code:
//------------------ Alloc
alloc(Alloc_Address_1,100)
registersymbol(Alloc_Address_1)
//------------------ Original
movdqu [rcx],xmm0
movups xmm1,[rax+10]
//------------------ Added by me
push r9 //Writing into Alloc_Address_1 sometimes occurred here
push r10
mov r9,[rcx] //Writing into Alloc_Address_1 sometimes occurred here, also
mov r10,[rcx+20]
add r9,r10
mov [Alloc_Address_1],r9
pop r10
pop r9
Are there multiple threads executing the same code?
Try adding a spinlock and see if it still happens:
Yes, this function is used by 12 different calls. I saw it in Ghidra.
The code makes the game frozen and takes up 100% of the CPU.
I found that the other thread has RBX less than RAX. So I made the filter by this deal. Now work fine.
I just use some calculation based on this instruction, and without a filter, in the middle (for example) of the calculation process, another thread comes and rewrites the value until the current thread has finished working
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum