I can imagine if you have a local variable on stack, and pass its pointer to another function,Chandra wrote:All the access to the stack segments are made VIA the cpu, so if you could just trick the compiler to access the right segments, may be you'd have some luck.............
which the compiler may generate code like:
Code: Select all
struct FOO {
int i;
};
int main() {
FOO f;
foo ( &f );
}
; int foo ( struct FOO* foo )
mov ebx, [esp+4] ; ebx -> foo
mov eax, [ebx] ; try to access foo->i