diff options
| author | Mike Pall <mike> | 2020-07-12 15:16:09 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2020-07-12 15:16:23 +0200 |
| commit | 60ac12ed6fd612c84359d50ef3ceb3cfc85f7045 (patch) | |
| tree | bb7aa9fb15703fe30dc17b25b1e85bf0a89fa8af /doc | |
| parent | 6097795367db86cd01ec9dccd13f8bffc16df580 (diff) | |
| parent | 7eb96843ff9d4bed019e8cd7c17727557e39e89c (diff) | |
| download | luajit-60ac12ed6fd612c84359d50ef3ceb3cfc85f7045.tar.gz luajit-60ac12ed6fd612c84359d50ef3ceb3cfc85f7045.tar.bz2 luajit-60ac12ed6fd612c84359d50ef3ceb3cfc85f7045.zip | |
Merge branch 'master' into v2.1
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/ext_ffi_semantics.html | 2 | ||||
| -rw-r--r-- | doc/extensions.html | 2 | ||||
| -rw-r--r-- | doc/faq.html | 40 |
3 files changed, 34 insertions, 10 deletions
diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html index 3444b8fb..5415787d 100644 --- a/doc/ext_ffi_semantics.html +++ b/doc/ext_ffi_semantics.html | |||
| @@ -1219,7 +1219,7 @@ suboptimal performance, especially when used in inner loops: | |||
| 1219 | <li>Table initializers.</li> | 1219 | <li>Table initializers.</li> |
| 1220 | <li>Initialization of nested <tt>struct</tt>/<tt>union</tt> types.</li> | 1220 | <li>Initialization of nested <tt>struct</tt>/<tt>union</tt> types.</li> |
| 1221 | <li>Non-default initialization of VLA/VLS or large C types | 1221 | <li>Non-default initialization of VLA/VLS or large C types |
| 1222 | (> 128 bytes or > 16 array elements.</li> | 1222 | (> 128 bytes or > 16 array elements).</li> |
| 1223 | <li>Bitfield initializations.</li> | 1223 | <li>Bitfield initializations.</li> |
| 1224 | <li>Pointer differences for element sizes that are not a power of | 1224 | <li>Pointer differences for element sizes that are not a power of |
| 1225 | two.</li> | 1225 | two.</li> |
diff --git a/doc/extensions.html b/doc/extensions.html index cf57e0e8..68193187 100644 --- a/doc/extensions.html +++ b/doc/extensions.html | |||
| @@ -408,7 +408,7 @@ the toolchain used to compile LuaJIT: | |||
| 408 | </tr> | 408 | </tr> |
| 409 | <tr class="even"> | 409 | <tr class="even"> |
| 410 | <td class="excplatform">Windows/x64</td> | 410 | <td class="excplatform">Windows/x64</td> |
| 411 | <td class="exccompiler">MSVC or WinSDK</td> | 411 | <td class="exccompiler">MSVC</td> |
| 412 | <td class="excinterop"><b style="color: #00a000;">Full</b></td> | 412 | <td class="excinterop"><b style="color: #00a000;">Full</b></td> |
| 413 | </tr> | 413 | </tr> |
| 414 | <tr class="odd"> | 414 | <tr class="odd"> |
diff --git a/doc/faq.html b/doc/faq.html index 31d91e2b..5c4ce533 100644 --- a/doc/faq.html +++ b/doc/faq.html | |||
| @@ -57,7 +57,7 @@ dd { margin-left: 1.5em; } | |||
| 57 | </li></ul> | 57 | </li></ul> |
| 58 | </div> | 58 | </div> |
| 59 | <div id="main"> | 59 | <div id="main"> |
| 60 | <dl> | 60 | <dl id="info"> |
| 61 | <dt>Q: Where can I learn more about LuaJIT and Lua?</dt> | 61 | <dt>Q: Where can I learn more about LuaJIT and Lua?</dt> |
| 62 | <dd> | 62 | <dd> |
| 63 | <ul style="padding: 0;"> | 63 | <ul style="padding: 0;"> |
| @@ -77,7 +77,7 @@ has information about diverse topics.</li> | |||
| 77 | </ul> | 77 | </ul> |
| 78 | </dl> | 78 | </dl> |
| 79 | 79 | ||
| 80 | <dl> | 80 | <dl id="tech"> |
| 81 | <dt>Q: Where can I learn more about the compiler technology used by LuaJIT?</dt> | 81 | <dt>Q: Where can I learn more about the compiler technology used by LuaJIT?</dt> |
| 82 | <dd> | 82 | <dd> |
| 83 | I'm planning to write more documentation about the internals of LuaJIT. | 83 | I'm planning to write more documentation about the internals of LuaJIT. |
| @@ -93,7 +93,7 @@ And, you know, reading the source is of course the only way to enlightenment. :- | |||
| 93 | </dd> | 93 | </dd> |
| 94 | </dl> | 94 | </dl> |
| 95 | 95 | ||
| 96 | <dl> | 96 | <dl id="arg"> |
| 97 | <dt>Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?<br> | 97 | <dt>Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?<br> |
| 98 | Q: My vararg functions fail after switching to LuaJIT!</dt> | 98 | Q: My vararg functions fail after switching to LuaJIT!</dt> |
| 99 | <dd>LuaJIT is compatible to the Lua 5.1 language standard. It doesn't | 99 | <dd>LuaJIT is compatible to the Lua 5.1 language standard. It doesn't |
| @@ -103,7 +103,7 @@ functions from Lua 5.0.<br>Please convert your code to the | |||
| 103 | vararg syntax</a>.</dd> | 103 | vararg syntax</a>.</dd> |
| 104 | </dl> | 104 | </dl> |
| 105 | 105 | ||
| 106 | <dl> | 106 | <dl id="x87"> |
| 107 | <dt>Q: Why do I get this error: "bad FPU precision"?<br> | 107 | <dt>Q: Why do I get this error: "bad FPU precision"?<br> |
| 108 | <dt>Q: I get weird behavior after initializing Direct3D.<br> | 108 | <dt>Q: I get weird behavior after initializing Direct3D.<br> |
| 109 | <dt>Q: Some FPU operations crash after I load a Delphi DLL.<br> | 109 | <dt>Q: Some FPU operations crash after I load a Delphi DLL.<br> |
| @@ -125,7 +125,7 @@ Please check the Delphi docs for the Set8087CW method. | |||
| 125 | 125 | ||
| 126 | </dl> | 126 | </dl> |
| 127 | 127 | ||
| 128 | <dl> | 128 | <dl id="ctrlc"> |
| 129 | <dt>Q: Sometimes Ctrl-C fails to stop my Lua program. Why?</dt> | 129 | <dt>Q: Sometimes Ctrl-C fails to stop my Lua program. Why?</dt> |
| 130 | <dd>The interrupt signal handler sets a Lua debug hook. But this is | 130 | <dd>The interrupt signal handler sets a Lua debug hook. But this is |
| 131 | currently ignored by compiled code (this will eventually be fixed). If | 131 | currently ignored by compiled code (this will eventually be fixed). If |
| @@ -136,7 +136,31 @@ twice to get stop your program. That's similar to when it's stuck | |||
| 136 | running inside a C function under the Lua interpreter.</dd> | 136 | running inside a C function under the Lua interpreter.</dd> |
| 137 | </dl> | 137 | </dl> |
| 138 | 138 | ||
| 139 | <dl> | 139 | <dl id="sandbox"> |
| 140 | <dt>Q: Can Lua code be safely sandboxed?</dt> | ||
| 141 | <dd> | ||
| 142 | Maybe for an extremly restricted subset of Lua and if you relentlessly | ||
| 143 | scrutinize every single interface function you offer to the untrusted code.<br> | ||
| 144 | |||
| 145 | Although Lua provides some sandboxing functionality (<tt>setfenv()</tt>, hooks), | ||
| 146 | it's very hard to get this right even for the Lua core libraries. Of course, | ||
| 147 | you'll need to inspect any extension library, too. And there are libraries | ||
| 148 | that are inherently unsafe, e.g. the <a href="ext_ffi.html">FFI library</a>.<br> | ||
| 149 | |||
| 150 | Relatedly, <b>loading untrusted bytecode is not safe!</b> It's trivial | ||
| 151 | to crash the Lua or LuaJIT VM with maliciously crafted bytecode. This is | ||
| 152 | well known and there's no bytecode verification on purpose, so please | ||
| 153 | don't report a bug about it. Check the <tt>mode</tt> parameter for the | ||
| 154 | <tt>load*()</tt> functions to disable loading of bytecode.<br> | ||
| 155 | |||
| 156 | In general, the only promising approach is to sandbox Lua code at the | ||
| 157 | process level and not the VM level.<br> | ||
| 158 | |||
| 159 | More reading material at the <a href="http://lua-users.org/wiki/SandBoxes"><span class="ext">»</span> Lua Wiki</a> and <a href="https://en.wikipedia.org/wiki/Sandbox_(computer_security)">Wikipedia</a>. | ||
| 160 | </dd> | ||
| 161 | </dl> | ||
| 162 | |||
| 163 | <dl id="patches"> | ||
| 140 | <dt>Q: Why doesn't my favorite power-patch for Lua apply against LuaJIT?</dt> | 164 | <dt>Q: Why doesn't my favorite power-patch for Lua apply against LuaJIT?</dt> |
| 141 | <dd>Because it's a completely redesigned VM and has very little code | 165 | <dd>Because it's a completely redesigned VM and has very little code |
| 142 | in common with Lua anymore. Also, if the patch introduces changes to | 166 | in common with Lua anymore. Also, if the patch introduces changes to |
| @@ -147,7 +171,7 @@ can use source transformations or use wrapper or proxy functions. | |||
| 147 | The compiler will happily optimize away such indirections.</dd> | 171 | The compiler will happily optimize away such indirections.</dd> |
| 148 | </dl> | 172 | </dl> |
| 149 | 173 | ||
| 150 | <dl> | 174 | <dl id="arch"> |
| 151 | <dt>Q: Lua runs everywhere. Why doesn't LuaJIT support my CPU?</dt> | 175 | <dt>Q: Lua runs everywhere. Why doesn't LuaJIT support my CPU?</dt> |
| 152 | <dd>Because it's a compiler — it needs to generate native | 176 | <dd>Because it's a compiler — it needs to generate native |
| 153 | machine code. This means the code generator must be ported to each | 177 | machine code. This means the code generator must be ported to each |
| @@ -158,7 +182,7 @@ architectures. Other architectures will follow based on sufficient user | |||
| 158 | demand and/or sponsoring.</dd> | 182 | demand and/or sponsoring.</dd> |
| 159 | </dl> | 183 | </dl> |
| 160 | 184 | ||
| 161 | <dl> | 185 | <dl id="when"> |
| 162 | <dt>Q: When will feature X be added? When will the next version be released?</dt> | 186 | <dt>Q: When will feature X be added? When will the next version be released?</dt> |
| 163 | <dd>When it's ready.<br> | 187 | <dd>When it's ready.<br> |
| 164 | C'mon, it's open source — I'm doing it on my own time and you're | 188 | C'mon, it's open source — I'm doing it on my own time and you're |
