Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Major BUGS with operations in FPU stack Breakpoints (7.2)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
gid2525
Expert Cheater
Reputation: 2

Joined: 21 Oct 2013
Posts: 101

PostPosted: Wed Feb 17, 2021 3:28 am    Post subject: Major BUGS with operations in FPU stack Breakpoints (7.2) Reply with quote

FPU operations in the stack don't get reported properly during a break and trace. Also when stepping into after a few steps. Like for instance if I were to break and trace some time before here:

fld dword ptr [2979B740]
fstp dword ptr [ebp-30]
mov eax,esi
fld dword ptr [ebp-20]
fstp dword ptr [ebp-54]
fld dword ptr [ebp-54]
frndint
fstp qword ptr [ebp-18]
movsd xmm0,[ebp-18]

The [ebp-30], [ebp-20], [ebp-54], [ebp-18], etc. All will show 0.00. Which is certainly NOT the case as I used x32dbg just fine (I actually had to because Cheat engine wouldn't show me the FPU stack amounts).

PeaceBeUponYou in the cheatthegame discord was also talking about it mentions:
"most of the processes (games) mask FPU arithmetic exception, that is why they do not crash"
"but doing it in CEs Tutorial will tell u that an exception (like division by 0) was caused"

Basically its been a bug for a while. It would be nice to get it fixed.
Thanks!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25804
Location: The netherlands

PostPosted: Wed Feb 17, 2021 3:59 am    Post subject: Reply with quote

I can't reproduce it..
I tried with this AA script
Code:

alloc(bla,1024)
alloc(val,4)
alloc(store,4)

alloc(stck,88)

val:
dd #100

stck:
dd (float)1
dd (float)2
dd (float)3
dd (float)4
dd (float)5
dd (float)6
dd (float)7
dd (float)8
dd (float)9
dd (float)10
dd (float)11
dd (float)12
dd (float)13
dd (float)14
dd (float)15
dd (float)16
dd (float)17
dd (float)18
dd (float)19
dd (float)20
dd (float)21
dd (float)22

bla:
push ebp
lea ebp,[stck+54]
fild [val]
fstp [store]

fld dword ptr [store]
fstp dword ptr [ebp-30]
mov eax,esi
fld dword ptr [ebp-20]
fstp dword ptr [ebp-54]
fld dword ptr [ebp-54]
frndint
fstp qword ptr [ebp-18]
movsd xmm0,[ebp-18]

pop ebp

ret


have you set the field to show FPU registers instead of XMM registers?



before fld load 14.png
 Description:
 Filesize:  100.82 KB
 Viewed:  1859 Time(s)

before fld load 14.png



after fld load 14.png
 Description:
 Filesize:  110.87 KB
 Viewed:  1859 Time(s)

after fld load 14.png



_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 170
Location: Milkey Way

PostPosted: Wed Feb 17, 2021 10:52 am    Post subject: Reply with quote

Its true. Debugging FPU instruction (especially arithmetic operation on values from 0.1-1 ) just corrupts data.

@DB try these


Code:

push (float)100
push (float)200
push (float)300
push (float)400
fld [esp]
fld [esp+4]
fld [esp+8]
fld [esp+C]
// you will see that after 2 flds the third one corrupts x87FPU stack and declears it as "Empty"


also operations like fpatan , fdiv , fmul all do
BIG NOTE: These are visible during single stepping (or with break and trace form)


using fld/fild and quickly fstp/fistp doesnt show any error. tho fst will (cuz its not poped Smile )
Back to top
View user's profile Send private message
gid2525
Expert Cheater
Reputation: 2

Joined: 21 Oct 2013
Posts: 101

PostPosted: Wed Feb 17, 2021 11:53 am    Post subject: Reply with quote

MMM-304 wrote:
Its true. Debugging FPU instruction (especially arithmetic operation on values from 0.1-1 ) just corrupts data.

@DB try these


Code:

push (float)100
push (float)200
push (float)300
push (float)400
fld [esp]
fld [esp+4]
fld [esp+8]
fld [esp+C]
// you will see that after 2 flds the third one corrupts x87FPU stack and declears it as "Empty"


also operations like fpatan , fdiv , fmul all do
BIG NOTE: These are visible during single stepping (or with break and trace form)


using fld/fild and quickly fstp/fistp doesnt show any error. tho fst will (cuz its not poped Smile )


YAASS. PLEASE FIX! This just kills trying to debug/trace FPU stuff. Thanks!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25804
Location: The netherlands

PostPosted: Wed Feb 17, 2021 2:06 pm    Post subject: Reply with quote

you forgot to mention which debugger interface you use.
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
gid2525
Expert Cheater
Reputation: 2

Joined: 21 Oct 2013
Posts: 101

PostPosted: Wed Feb 17, 2021 2:57 pm    Post subject: Reply with quote

Dark Byte wrote:
you forgot to mention which debugger interface you use.


I'm using the VEH debugger..is that what you mean? DVBM won't work for me anyway cause AMD Ryzen 9 3900X. But I would prefer the VEH gets fixed of course Razz
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25804
Location: The netherlands

PostPosted: Wed Feb 17, 2021 3:12 pm    Post subject: Reply with quote

It's fixed in the sourcecode on github

The windows debugger interface doesn't have that issue, and the 32-bit CE version also doesn't have that issue with veh debug

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 170
Location: Milkey Way

PostPosted: Thu Feb 18, 2021 6:22 am    Post subject: Reply with quote

hmm..
I was using VEH on CE 64-bit that supports SSE4-AVX instruction sets as well
Back to top
View user's profile Send private message
gid2525
Expert Cheater
Reputation: 2

Joined: 21 Oct 2013
Posts: 101

PostPosted: Fri Feb 19, 2021 8:56 am    Post subject: Reply with quote

Dark Byte wrote:
It's fixed in the sourcecode on github

The windows debugger interface doesn't have that issue, and the 32-bit CE version also doesn't have that issue with veh debug


Yea I use the cheatengine-x86_64-SSE4-AVX2.exe file.. Did you fix that one? Im not sure how to compile it or where on the github pag Sad
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25804
Location: The netherlands

PostPosted: Fri Feb 19, 2021 9:17 am    Post subject: Reply with quote

next version is fixed

just use cheatengine-i386.exe for now if you target a 32 bit process

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
gid2525
Expert Cheater
Reputation: 2

Joined: 21 Oct 2013
Posts: 101

PostPosted: Fri Feb 19, 2021 11:25 am    Post subject: Reply with quote

Dark Byte wrote:
next version is fixed

just use cheatengine-i386.exe for now if you target a 32 bit process


Ah, you mean 7.3? Do you have an eta for that? Just curious. Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites