[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: use of invalid L in libevent wrapper from Lua Programming Gems
- From: Sam Roberts <vieuxtech@...>
- Date: Thu, 17 Dec 2009 10:26:58 -0800
The wrapper in gem 27 doesn't use L as passed to priv.dispatch(),
instead it uses some previously-valid L.
Cheers,
Sam
This code segfaults:
require "Event"
local function callback(event, fd, event_type)
end
local creator = coroutine.wrap(function()
return Event.create(0, Event.EV_READ, callback)
end)
event = creator()
event:add(1)
Event.dispatch()