]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Document 47 bit limit for lightuserdata.
authorMike Pall <mike>
Fri, 25 Nov 2016 08:23:08 +0000 (09:23 +0100)
committerMike Pall <mike>
Fri, 25 Nov 2016 08:23:08 +0000 (09:23 +0100)
doc/status.html

index d10033b0b95380c9a94707de2d1a9a5045c033d0..0acf78c97174215fd921807198710938bd679852 100644 (file)
@@ -97,6 +97,17 @@ handled correctly. The error may fall through an on-trace
 <tt>lua_atpanic</tt> on x64. This issue will be fixed with the new
 garbage collector.
 </li>
+<li>
+LuaJIT on 64 bit systems provides a <b>limited range</b> of 47 bits for the
+<b>legacy <tt>lightuserdata</tt></b> 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 <tt>lightuserdata</tt> 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.
+</li>
 </ul>
 <br class="flush">
 </div>