sol2 icon indicating copy to clipboard operation
sol2 copied to clipboard

SIGSEGV when getting protected function from `sol::state`

Open skywalkerytx opened this issue 3 years ago • 0 comments
trafficstars

build system

ubuntu 20.04

clang-12 with c++20

using Clion 2022.2.1

lua related

sol-3.2.2 with luajit-2.1

what I did

sol::protected_function foo = lua_state["bar"];
lua_state = std::move(new_state);
foo = lua_state["bar"]; //SIGSEGV here

expected behavior

no segfault

full script to reproduce

https://gist.github.com/skywalkerytx/87e46500fc2ceb2fa58eef99e203f4af

skywalkerytx avatar Aug 23 '22 08:08 skywalkerytx