Re: [BUG?] Segmentation fault in lua_error() - easily reproducible

  • From: "Sergei Zhirikov" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "sfzhi@xxxxxxxxx" for DMARC)
  • To: "luajit@xxxxxxxxxxxxx" <luajit@xxxxxxxxxxxxx>
  • Date: Sun, 14 Dec 2014 09:38:28 +0000 (UTC)

Finally, someone with common sense. Thank you.

Back to the point, which is my original email. Please kindly ignore everything 
written after that as irrelevant. However, to avoid any further meaningless 
arguments, here is a modified version of the example code, which does not 
change anything with respect to the segmentation fault:

#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <stdio.h>

int main()
{
   lua_State *lua = luaL_newstate();
   luaL_openlibs(lua);
   lua_State *lua2 = lua_newthread(lua);
   luaL_loadstring(lua2, "coroutine.yield()");
   int res = lua_resume(lua2, 0);
   printf("res=%d, top=%d\n", res, lua_gettop(lua2));
   lua_pushliteral(lua2, "test");
   lua_error(lua2);
   return 0;
}


________________________________
From: William Adams <william_a_adams@xxxxxxx>
To: luajit@xxxxxxxxxxxxx 
Sent: Sunday, December 14, 2014 6:13 AM
Subject: RE: [BUG?] Segmentation fault in lua_error() - easily reproducible

This argument has devolved into a slapping fight.
Can you please move on, or get back to a point where meaningful help can be 
offered.

Sent from my Windows Phone

Other related posts: