AV in cmpxchg8b

c++ / delphi package - dll injection and api hooking
Post Reply
vladika
Posts: 1
Joined: Wed Mar 16, 2005 3:57 pm

AV in cmpxchg8b

Post by vladika »

madCodeHook version 2.1d, delphi 6 sp1

I tried to recompile madCodeHook with optimization switched off.
When I run program I got AV in procedure cmpxchg8b.

The line mov ebp, [esp+$20] assumes that there is no stack frame in cmpxchg8b procedure but when optimization switched off Delphi adds stack frame for this procedure and code execution generates AV.

The solution is to switch optimization on for this procedure.

Sorry if it was reported before and already fixed.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Ouch. Thanks for the hint, I'll fix that.
Post Reply