Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction between cffi and lgi causes crashes #48

Open
xinhaoyuan opened this issue Jun 9, 2024 · 0 comments
Open

Interaction between cffi and lgi causes crashes #48

xinhaoyuan opened this issue Jun 9, 2024 · 0 comments

Comments

@xinhaoyuan
Copy link

Hi, please see the below code for demo.

-- Uncommenting the line below will introduce a crash in callback:free().
require("cffi")
local lgi = require("lgi")
local callback = require("cffi").cast("void (*)()", function() end)
print("Before free")
callback:free()
print("After free")

I'm using cffi from luarocks, lua 5.1, and lgi from Debian repo (unstable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant