[ANN] OpenResty 188.8.131.52 released
Yichun Zhang (agentzh)
agentzh at gmail.com
Sat Apr 22 01:31:14 UTC 2017
Long time no releases. We've been very busy setting up the OpenResty
Inc. commercial company in the US. That's why we've been quiet in the
last few months. The good news is that we now have a strong full-time
engineering team that can work on both the OpenResty open source
platform and higher-level commercial products based on that. The
OpenResty web platform will always remain open source. There's no
doubt about that ;)
Now I am excited to announce the new formal release, 184.108.40.206, of the
OpenResty web platform based on NGINX and LuaJIT:
Both the (portable) source code distribution and the Win32 binary
distribution are provided on this Download page.
OpenResty's official yum repositories will get updated to use the this
new version as soon as Fedora's COPR site is back online:
Special thanks go to all our developers and contributors!
We have the following highlights in this release:
* We greatly reduced the chance of hash collisions in LuaJIT's global
string table for x86_64 systems with SSE 4.2 support.
* We removed the standard Lua 5.1 interpreter from our bundle. We now
use LuaJIT exclusively. We will soon drop compatibility with the
standard 5.1 interpreter in the OpenResty core so that we no
longer have to maintain two parallel implementations of our Lua API (one
based on CFunction, and the one based on FFI).
* We add HTTP/HTTPS proxy support to our OPM client for restricted
* We now includes a very new LuaJIT v2.1 version with new builtin
functions like Lua 5.3's table.move().
* New --shdict "NAME SIZE" and --resolve-ipv6 options in the "resty"
* Automatic Lua bracktrace output on Lua exceptions in the "resty"
* Important bug fixes regarding retries count limit in balancer_by_lua*.
* ngx.redirect() now supports 303 as well.
The complete change log since the last (formal) release, 220.127.116.11:
* change: we no longer bundle the standard Lua 5.1 interpreter
(aka the PUC-Rio Lua). now we only bundle LuaJIT.
* win32: upgraded PCRE to 8.40, zlib to 1.2.11, and OpenSSL to
* bugfix: we did not use "PATH" in "./configure --sbin-path=PATH"
when creating symlinks. thanks David Galeano for the patch.
* bugfix: default index.html: missing the "</p>" tag. thanks
Xiaoyu Chen for the patch.
* feature: applied the "safe_resolver_ipv6_option" patch to the
nginx core to avoid the "ipv6=off" option to be parsed by nginx
when it is not built with IPv6 support. thanks Thibault
Charbonnier for the patch.
* feature: now we automatically add the "-msse4.2" compilation
option for building the bundled LuaJIT when it is available.
* upgraded ngx_lua to 0.10.8.
* feature: fixed build compatibility with BoringSSL. thanks
Tom Thorogood for the patch. Note: BoringSSL is *not* an
officially supported target.
* feature: "tcpsock:connect()": allows the "options_table"
argument being nil. thanks Dejiang Zhu for the patch.
* feature: added support for the 303 status code in
ngx.redirect(). thanks Tom Thorogood for the patch.
* bugfix: C API: "ngx_http_lua_add_package_preload()" might
not take effect when lua_code_cache is off. thanks jimtan
for the patch.
* bugfix: balancer_by_lua*: the number of retres might exceed
the limit of proxy_next_upstream_tries or alike.
* bugfix: setting response headers would change the
"Content-Type" response header. thanks leafo for the report
and Ming Wen for the patch.
* bugfix: tcp cosockets: "sslhandshake()": typo in the error
message. thanks detailyang for the patch.
* bugfix: typo fix in C POST args handler debug log. thanks
Robert Paprocki for the patch.
* change: removed the use of "luaL_getn()" macro as it is no
longer available in the latest LuaJIT v2.1. thanks Datong
Sun for the patch.
* change: removed the "mmap(sbrk(0))" memory trick since glibc
leaks memory when it is forced to use "mmap()" to fulfill
* doc: ngx.exit() also returns immediately in the
balancer_by_lua* context. thanks Jinhua Tan for the patch.
* doc: various wording tweaks and more code examples. thanks
Dayo Akanji for the patch.
* doc: added a note about the LRU regex cache used in the
ngx.re.* implementation of lua-resty-core.
* tests: the test suite can now work with PCRE 8.39 ~ 8.40.
thanks Andreas Lubbe for the patch.
* upgraded resty-cli to 0.17.
* optimize: removed unwanted exit status handling. thanks
Thibault Charbonnier for the patch.
* feature: generates Lua stacktraces by default for user
errors. thanks Thibault Charbonnier for the patch.
* bugfix: fixed exit code handling for nginx crashes and INT
signal interrupts. thanks Aliaxandr Rahalevich and Gordon
Gao for the report.
* feature: resty: added the --shdict "NAME SIZE" option.
thanks Thibault Charbonnier for the patch.
* feature: resty: added new command-line option
"--resolve-ipv6". thanks Thibault Charbonnier for the patch.
* upgraded opm to 0.0.3.
* "dist.ini": relaxed the github repo link check.
* feature: added support for HTTP proxies via environments
"http_proxy" and "https_proxy".
* bugfix: tar might give the permissions error 'Cannot change
ownership to uid XX, gid XX: Operation not permitted'.
thanks Jon Keys for the patch.
* upgraded lua-resty-core to 0.1.11.
* feature: "resty.core.regex": exported internal Lua helper
functions "collect_captures", "check_buf_size", and
"re_sub_compile". these functions are deliberately
undocumented and thus subject to future changes.
* change: "resty.core": made the warning louder by turning it
to an alert when LuaJIT 2.0 is used.
* bugfix: ngx.re: "split()" might enter infinite loops when
the regex is an empty string. thanks Dejiang Zhu for the
* upgraded lua-resty-lock to 0.06.
* optimize: use branch-free algorithms for variables
assignment. thanks Thibault Charbonnier for the patch.
* optimize: removed the unused shdict metatable retrieval
code. thanks Thibault Charbonnier for the patch.
* doc: various documentation improvements from Thibault
* upgraded lua-resty-lrucache to 0.06.
* bugfix: "resty.lrucache": the "get()" method incorrectly
ignored "false" values. thanks Proton for the patch.
* optimize: small tweaks from Aapo Talvensaari and Thibault
* doc: typo fixes from Gordon Gao.
* upgraded lua-resty-mysql to 0.19.
* bugfix: the 8-bit packet numbers might overflow and led to
runtime Lua exceptions. thanks Ming Wen for the patch.
* upgraded lua-resty-limit-traffic to 0.03.
* bugfix: fixed several known race conditions by switching to
"shdict:incr(k, v, init)". thanks Thibault Charbonnier for
* optimize: use "math.max()" to reduce Lua branches. thanks
Thibault Charbonnier for the patch.
* upgraded lua-redis-parser to 0.13.
* bugfix: removed the use of the old Lua 5.0 "luaL_getn" API
function since the latest LuaJIT 2.1 just removed it.
* upgraded lua-cjson to 18.104.22.168.
* feature: supports MS C compiler older than VC2012. thanks
spacewander for the patch.
* bugfix: fixed compilation errors from the Microsoft C
compiler. thanks Tim Chen for the patch.
* bugfix: conditionally build "luaL_setfuncs()" function as
the latest LuaJIT v2.1 already includes it. thanks Datong
Sun for the patch.
* bugfix: preserve "empty_array_mt" behavior upon multiple
loadings of the module. thanks Thibault Charbonnier for the
* upgraded ngx_redis2 to 0.14.
* feature: fixed compilation errors with Nginx 1.11.6+.
* upgraded ngx_memc to 0.18.
* feature: fixed the compilation errors with nginx 1.11.6+.
thanks Hiroaki Nakamura for the patch.
* upgraded ngx_drizzle to 0.1.10.
* feature: fixed compilation issues with nginx 1.11.6+. thanks
James Christopher Adduono for the patch.
* bugfix: fixed errors and warnings with C compilers without
variadic macro support.
* upgraded LuaJIT to v2.1-20170405:
* feature: added the bytecode option "L" to display lua source
line numbers. thanks Dejiang Zhu for the patch.
* optimize: x64: "lj_str_new": uses randomized hash functions
based on crc32 when "-msse4.2" is used in build options.
thanks Shuxin Yang for the patch.
* optimize: "lj_str_new": tests the full hash value before
doing the full string comparison on hash collisions. thanks
Shuxin Yang for the patch.
* imported Mike Pall's latest changes:
* Add some more changes and extensions from Lua 5.2.
* Remove old Lua 5.0 compatibility defines.
* FFI: Fix FOLD rules for "int64_t" comparisons.
* ARM64: Add big-endian support.
* x64/"LJ_GC64": Fix "emit_loadk64()".
* "LJ_GC64": Fix "BC_CALLM" snapshot handling.
* x64/"LJ_GC64": Fix assembly of CNEWI with 64 bit
* ARM64: Fix Nintendo Switch build.
* ARM64: Fix XLOAD/XSTORE with FP operand.
* Remove unnecessary mcode alloc pointer check.
* Limit mcode alloc probing, depending on the available
* Fix overly restrictive range calculation in mcode
* Fix out-of-scope goto handling in parser.
* Remove internal "__mode = "K"" and replace with safe
* Fix annoying warning, due to deterministic binutils
* DynASM: Fix warning.
* MIPS64, part 2: Add MIPS64 hard-float JIT compiler
* Fix FOLD rules for "math.abs()" and FP negation.
* Fix soft-float "math.abs()" and negation.
* x64/"LJ_GC64": Fix warning for DUALNUM build.
* x64/"LJ_GC64": Fix (currently unused) integer stores in
* ARM64: Cleanup and de-cargo-cult TValue store
* MIPS: Don't use "RID_GP" as a scratch register.
* MIPS: Fix emitted code for U32 to float conversion.
* MIPS: Backport workaround for compact unwind tables.
* Make "checkptrGC()" actually work.
* ARM64: Fix AREF/HREF/UREF fusion.
* "LJ_GC64": Add build options and install instructions.
* Add some more extensions from Lua 5.2/5.3.
* Fix cross-endian jit.bcsave for MIPS target.
* ARM64: Remove unused variables in disassembler.
* ARM64: Fuse BOR/BXOR and BNOT into ORN/EON.
* Add "proto" field to "jit.util.funcinfo()".
* Add missing FOLD rule for 64 bit shift+BAND
* ARM64: Fix code generation for S19 offsets.
* ARM64: Fuse various BAND/BSHL/BSHR/BSAR combinations.
* ARM64: Fuse FP multiply-add/sub.
* ARM64: Fuse XLOAD/XSTORE with STRREF/ADD/BSHL/CONV.
* ARM64: Reorganize operand extension definitions.
* ARM64: Add missing ldrb/strb instructions to
* ARM64: Fix pc-relative loads of consts. Cleanup branch
* ARM64: Make use of tbz/tbnz and cbz/cbnz.
* Eliminate use of lightuserdata derived from static data
* ARM64: Emit more efficient trace exits.
* Generalize deferred constant handling in backend to 64
* ARM64: Reject special case in "emit_isk13()".
* ARM64: Allow full VA range for mcode allocation.
* ARM64: Add JIT compiler backend.
* Fix amalgamated build.
* Increase range of "GG_State" loads via "IR_FLOAD" with
* MIPS: Fix TSETR barrier.
* Report parent of stitched trace.
The HTML version of the change log with lots of helpful hyper-links
can be browsed here:
OpenResty is a full-fledged web platform
by bundling the standard Nginx core, Lua/LuaJIT, lots of
3rd-party Nginx modules and Lua libraries, as well as most of their external
dependencies. See OpenResty's homepage for details:
We have run extensive testing on our Amazon EC2 test cluster and
ensured that all the components (including the Nginx core) play well
together. The latest test report can always be found here:
PS 1: we've been privately building a Perl 6 dialect
compiler that can compile a large (non-strict) subset of the Perl 6
programming language into optimized and standalone Lua code targeting
the OpenResty web platform. This compiler is called fanlang. Our
initial benchmark already shows that the Lua code generated by the
fanlang compiler is significantly faster than the official/reference
implementation of Perl 6. Our fanlang compiler is already mature enough
that has already been
successfully used to build another compiler for a domain specific
language called edgelang. The edgelang compiler also emits optimized
and standalone Lua code targeting OpenResty. This release is the first
OpenResty formal version that can fully support our fanlang and edgelang
compilers. We have plans to open source a basic version of our fanlang
compiler to the community once it is fully bootstrapped by itself.
PS 2: We'll try upgrading the NGINX core in OpenResty to the latest
version in the next OpenResty release. Stay tuned!
More information about the nginx