lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> On illumos and similar systems...
> 
> #include <stdio.h>
> #include <stdint.h>
> 
> int main() {
>   char foo[32];
>   printf("%llx\n", (uintptr_t)foo);
>   return 0;
> }
> 
> will result in a perfectly reasonable pointer of:
> 
> fffffd7fffdffb80
> 
> this is what makes it problematic.

Either I don't understand what you are saying or you did not understand
what I said.

It does not matter the value of '&foo'. As long as it differ by at
most 2^30 from some base stack address (easily saved on start up),
all LuaJIT has to store is that 2^30 offset plus one bit to tell
that the address refers to the stack (and therefore must be added
to that base stack address when queried).

-- Roberto