MCPcopy Create free account
hub / github.com/black-sliver/PopTracker / func

Function func

test/lib/test_lua.cpp:10–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8static std::weak_ptr<int> ptr;
9
10static int func(lua_State *L) {
11 auto mem = std::make_shared<int>(42);
12 ptr = mem;
13 asm volatile("": : :"memory");
14 luaL_error(L, "error");
15 return 0;
16}
17
18TEST(LuaTest, CppStackUnwrap) {
19 // Lua needs to be configured to use C++ exceptions instead of longjmp for this to succeed

Callers 1

runMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected