logoalt Hacker News

tom_today at 4:03 PM1 replyview on HN

Nested functions may require a context pointer of some kind, which the caller can't supply. One way of doing this: create a thunk on the stack that provides the context pointer, and use that address as the pointer to the nested function.

But now the stack needs to be executable.


Replies

ok123456today at 5:26 PM

Doesn't x86 actually support nested call pointers using enter to natively support this in Pascal?

show 1 reply