[Issue 5591] EBX register not preserved when calling stdcall function pointer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 17 13:55:35 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5591



--- Comment #5 from hypothermia.frost at gmail.com 2011-02-17 13:53:00 PST ---
Ok, but as I said earlier this bug happened to me when the pointer call
happened in a member function call. The EBX register contained a 'this' pointer
and the compiler used it to load the function pointer. But after calling this
function pointer the compiler still thought EBX contained 'this' and I got an
Access Violation exception thrown when I tried to access a field from 'this'. I
saw this all using debugger and I traced the EBX change to the call of the
function pointer. And then how is this not a bug If the compiler thinks that
after using the EBX register, It has a value from previous use? Maybe Its hard
for you to understand what I'm trying to explain, but I will try to make an
example code to prove my point.

-- 
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