Skip to content

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 28 Oct 11:10
· 34 commits to ngc since this release

Release 0.3.1

Native library for hosting the SLua runtime: slua_shim for Windows x64 and Linux x64. The package
built from these files carries no managed code; the host binds to the C interface in slua_shim.h.

  • Runtime pin: 9dae328 (the commit of the SLua tree the libraries are built against)
  • API version: 5 (a host must check slua_api_version() for an exact match)
  • Saved-state stamp format: runtime=<pin> api=<n>; slua_version returns the same text,
    here runtime=9dae3285f6 api=5
  • Built from commit: 5afc9eb

Every file was built or copied by one CI run from that commit. SHA256SUMS.txt lists the SHA-256 of
every other file in the release (check with sha256sum -c SHA256SUMS.txt).

File Contents
slua-native-win-x64-0.3.1.zip slua_shim.dll
slua-native-linux-x64-0.3.1.tar.gz libslua_shim.so, built on Ubuntu 22.04
slua_shim.h the C interface
THIRD-PARTY-NOTICES.txt, licenses.zip licences of everything linked into the libraries

What changed since 0.3.0 (API version unchanged at 5)

The exports, their signatures and the API version are the same as in 0.3.0. A host that needs API version 5 loads this library as it loaded the last one.

  1. A script that caught an error with pcall inside an event handler faulted with corrupt yield state once the handler returned. The event dispatcher saved its yield state only when the handler yielded; an error caught by a pcall in the handler unwinds the dispatcher's frame without a yield, and the dispatcher then read a state that was never written. The dispatcher now saves its state before it calls the handler (YIELD_CALL_SAVING_STATE in VM/include/lyieldablemacros.h).
  2. The same defect was in every other yieldable function that calls script code. It now applies to string.gsub with a replacement function, table.sort with a comparison function, lljson.encode (the replacer option and __tojson metamethods), lljson.decode (the reviver) and the LLTimers tick that calls a timer's handler. A callback that caught an error made the function lose its state (corrupt yield state) or read the wrong value: string.gsub kept the original text, table.sort did not reorder, lljson.encode wrote null.
  3. The saved state now also records where the callback's results sit on the frame, and the "yielding" mark that the early save sets is cleared again when the callback returns without a yield, so the chained helpers of table.sort and the JSON functions can use it. A first attempt that only saved the state before every call broke seven of the runtime's own conformance tests for this reason.
  4. ngc-host/LL-RUNTIME-PIN names the commit that carries this change (it changes files of the parent tree), and the stamp's runtime part is that commit. Scripts saved by 0.3.0 start fresh once because the runtime part of the stamp changed.