From: Mike Pall Date: Fri, 25 Nov 2016 08:23:08 +0000 (+0100) Subject: Document 47 bit limit for lightuserdata. X-Git-Tag: v2.1.0-beta3~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6538c8a18711a6eb009def36050acd5f02e42aec;p=thirdparty%2FLuaJIT.git Document 47 bit limit for lightuserdata. --- diff --git a/doc/status.html b/doc/status.html index d10033b0..0acf78c9 100644 --- a/doc/status.html +++ b/doc/status.html @@ -97,6 +97,17 @@ handled correctly. The error may fall through an on-trace lua_atpanic on x64. This issue will be fixed with the new garbage collector. +
  • +LuaJIT on 64 bit systems provides a limited range of 47 bits for the +legacy lightuserdata data type. +This is only relevant on x64 systems which use the negative part of the +virtual address space in user mode, e.g. Solaris/x64, and on ARM64 systems +configured with a 48 bit or 52 bit VA. +Avoid using lightuserdata to hold pointers that may point outside +of that range, e.g. variables on the stack. In general, avoid this data +type for new code and replace it with (much more performant) FFI bindings. +FFI cdata pointers can address the full 64 bit range. +