[Issue 10462] New: interface thunk doesn't preserve EBX
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 24 06:13:56 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10462
Summary: interface thunk doesn't preserve EBX
Product: D
Version: D2
Platform: x86
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: code at dawg.eu
--- Comment #0 from Martin Nowak <code at dawg.eu> 2013-06-24 06:13:55 PDT ---
This is a followup of Bug 9729.
The generated interface thunk now look like this.
_TMP3 LABEL NEAR
sub eax, 8 ; 0050 _ 83. E8, 08
call ?_007 ; 0053 _ E8, 00000000
?_007 LABEL NEAR
pop ebx ; 0058 _ 5B
add ebx, offset _GLOBAL_OFFSET_TABLE_-$+1H ; 0059 _ 81. C3,
00000003(GOT r)
jmp _D3bug4Lock4lockMFZv ; 005F _ E9,
FFFFFFFC(PLT r)
The problem here is that the EBX is not restored after the direct jump which
leads to bug when it was used in the calling function.
Not sure what the best solution to this is. Replacing the jump with a call is
not a good solution because of it alters the stack, i.e. parameters and return
values don't fit.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list