Skip to content

LuaJIT FFI versus CFFI: CFFI permits setting a new function to a callback on which free() has been called, causing a crash upon execution of the callback or free() #57

@gynt

Description

@gynt
cffi = require("cffi")
callback = cffi.cast("void (*)()", function() end)
callback:free()
callback:set(function() end)
callback:free() -- this line crashes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions