In ldblib.c line 167 options have value " >L"
if (!lua_getinfo(L1, options, &ar))
return luaL_argerror(L, arg+2, "invalid option");
Ii im change options like this
if (!lua_getinfo(L1,"L", &ar))
return luaL_argerror(L, arg+2, "invalid option");
recompile lua5.4.7 and execute code
sample = 'print("hello")'
stripped = load(string.dump(load(sample), true))
print(debug.getinfo(stripped, "L"))
dron@gnu:~/test/lua-5.4.7$ ./src/lua test.lua
table: 0x5566677040d0
dron@gnu:~/test/lua-5.4.7$
I have no idea if I did the right thing, I just assumed that the option value was wrong. This is just my observation and debugging via printf :) and not a fix, but I hope it's useful =)