diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-09-28 00:08:39 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-09-30 12:31:56 +0000 |
commit | f52d1d52a6247aa04dc328d081736b387ad8be6c (patch) | |
tree | 5de49d1e17933d4e1e854a41ef1fd3da7d6b5122 /epan/wslua/make-reg.pl | |
parent | 01bd832b9df9570ddfd81ab4985f71ff6abd9b12 (diff) |
wslua: do not pop from empty stack on newer LUA versions
Fixes this failure:
tshark: lapi.c:175: lua_settop: Assertion `(-(idx+1) <= (L->top - (func + 1))) && "invalid new top"' failed.
Found using LUA 5.2 compiled with -DLUA_USE_APICHECK. Note that the
value returned by luaopen_bit does not affect the size of the stack
after using lua_call; if there are excess return values, then these will
be dropped after calling lua_call. See http://www.lua.org/pil/26.2.html
I also verified that the stack is still empty after calling all
wslua_reg_module functions.
Change-Id: Ia72635277ca4d8077e47a5c472391a78fe6d311e
Reviewed-on: https://code.wireshark.org/review/10664
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/wslua/make-reg.pl')
-rwxr-xr-x | epan/wslua/make-reg.pl | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/epan/wslua/make-reg.pl b/epan/wslua/make-reg.pl index 683ceaf5c1..12975caba2 100755 --- a/epan/wslua/make-reg.pl +++ b/epan/wslua/make-reg.pl @@ -87,8 +87,6 @@ for (@classes) { print C "\twslua_reg_module(L, \"${_}\", ${_}_register);\n"; } print C "\twslua_reg_module(L, \"bit\", luaopen_bit);\n"; -# the bitops library returns a value on the stack - get rid of it -print C "\tlua_pop(L,1);\n"; print C "\twslua_reg_module(L, \"GRegex\", luaopen_rex_glib);\n"; print C "}\n\n"; |