pygy / strung.lua

Lua string patterns rewritten in Lua + FFI, for LuaJIT.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

strung.match crashing

CapsAdmin opened this issue · comments

And I'm having difficulties figuring out why. In large scale project I call require("strung").install() early on during initialize and I always crash here:

https://github.com/CapsAdmin/goluwa/blob/master/.base/lua/modules/lj-opengl/init.lua#L165

where line is
"VOID wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)"

but isolating this does not crash so it may be a garbage collection thing. I'm using latest luajit 2.1 from the git repo.

Thanks for the report. I'm at a family gathering right now, I'll look into it when I can.

I haven't been able to run goluwa locally, since I use a Mac and I don't have the libraries required installed. I'll try to either install them or run goluwa in a Linux VM.

The most annoying thing is that gsub() was not being installed(), this means that the bug probably lies in the compiled matchers which are a pain to debug.

Do you get any error message/stack trace?

Sorry but I haven't tried it on a Mac and it's been a while since I tried it on Linux as well. It's most likely going to be very time consuming for you to try and get it working.

I already modified strung to install gsub (just uncommented , "gsub")

As for a stack trace the only thing I get if I attach visual studio is

"Unhandled exception at 0x586E22B8 (lua51.dll) in luajit.exe: Stack cookie instrumentation code detected a stack-based buffer overrun."

Otherwise the whole thing just exits without any crash dialog (i think it's a jump)

If I use debug.sethook for every call along with debug.traceback() the line in the OP is where it ends up crashing.

This crash does no longer happen and I'm not sure what fixed it. My framework has gone through a lot of change and there's been a few updates to luajit as well since. :)