Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skynet/3rd/lua/lauxlib.c
Line 629 in 1020c40
LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { B->L = L; B->b = B->init.b; B->n = 0; B->size = LUAL_BUFFERSIZE; lua_pushlightuserdata(L, (void*)B); /* push placeholder */ }
luaL_buffinit 引入了
lua_pushlightuserdata(L, (void*)B); /* push placeholder */
导致栈失衡
skynet/lualib-src/lua-bson.c
Line 1082 in 1020c40
static int lbinary(lua_State *L) { lua_settop(L,1); luaL_Buffer b; luaL_buffinit(L, &b); luaL_addchar(&b, 0); luaL_addchar(&b, BSON_BINARY); luaL_addchar(&b, 0); // sub type luaL_addvalue(&b); // 此处使用的是-1本意为传入的参数,但是却使用了luaL_buffinit 引入的lightuserdata 导致功能错误 luaL_pushresult(&b); return 1; }
由于不清楚是否还引入了其它的错误 需要 @cloudwu 确认下
The text was updated successfully, but these errors were encountered:
f61a27a
谢谢。我检查了其它类似的地方,应该没有问题。
ps. 前几天在邮件列表看到了类似的问题:http://lua-users.org/lists/lua-l/2021-04/msg00027.html 这次 lua 5.4.3 升级,应该有很多历史库会有这类 bug 。
Sorry, something went wrong.
Merge pull request #144 from cloudwu/master
077e007
fix cloudwu#1388
No branches or pull requests
skynet/3rd/lua/lauxlib.c
Line 629 in 1020c40
luaL_buffinit 引入了
导致栈失衡
skynet/lualib-src/lua-bson.c
Line 1082 in 1020c40
由于不清楚是否还引入了其它的错误 需要 @cloudwu 确认下
The text was updated successfully, but these errors were encountered: