On Thursday, 5 March 2020 at 16:54:35 UTC, AB wrote:
I am only guessing, but I think the problem is line 87.
Arrays and slices in D contain a length field and thus do not
need to be null terminated.
The foreach at line 96 iterates on all valid indices and thus
in the last iteration you call luaL_requiref(L, null, null, 1).
Try changing
static const luaL_Reg[] loadedlibs = [
...
{LUA_DBLIBNAME, &luaopen_debug},
{null, null}
];
to
static const luaL_Reg[] loadedlibs = [
...
{LUA_DBLIBNAME, &luaopen_debug}
];
I knew I was blind, thank you. Segfault is gone.
Now I should look at getting the CI up and Test failure fixed.