[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: userdata access after __gc?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 16 Oct 2012 14:20:12 -0300
> While that holds in this case, I can modify my test program to trigger
> the call on the gc'd object even when the userdata is not exposed to Lua
> (see attached). My example differs from the PIL example only in the
> order of object creation.
If you can crash the PiL example please let me know.
> Also, in the other example from the book, it appears that lxp_parse()
> accesses xpu->parser without a guard, which comes from a userdata that
> is exposed to Lua. Actually in this case it appears you could trigger
> a crash just by calling close() explicitly and then parse()? Maybe I
> am missing something here. http://www.lua.org/pil/29.2.html
That is a real bug (although not directly related to finalizers)!
Thanks for the report.
-- Roberto