[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Is bug Lua 5.2.0 #3 also present in Lua 5.1.4?
- From: Benoit Germain <bnt.germain@...>
- Date: Wed, 8 Aug 2012 20:19:00 +0200
Hello,
I have a C module that anchors a resource cleaning desinit function as __gc to a full userdata it stores in the registry.
Then some script I run with LfW's Lua 5.1.4 uses the module to create some other userdata.
Occasionally, I stumble on a crash at application shutdown where the second userdata gets collected seemingly after the first one (since the gc function has been called), causing it to access resources that are no longer available.
It looks oddly similar to the known bug "Finalizers may call functions from a dynamic library after
the library has been unloaded."
I believe my code is the culprit (since multi threading is involved), but until I understand what's wrong, is there any chance that this is the explanation I seek?
Regards,
--
Benoit.