This is an example that can be reproduced.
for i = 1, 1000 do
require 're'
package.loaded['re'] = nil
print('test', i)
end
And in lprefix.h add
#include <assert.h>
#define lua_assert(cond) assert(cond)
lpeg is not required, this is just a way to easily create a lot of userdata.
It doesn't reproduce every time, you can try it a few more times.
--actboy168