forked from LuaJIT/LuaJIT
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When cdata has custom finalizer (and so LJ_GC_CDATA_FIN flag) it is not collected immediately, when lj_cdata_free() is called. Instead, it is resurrected and marked finalized, so it is collected at the next GC cycle. The reason of the bug is that gc_cdatanum is decremented when cdata is resurrected too (i.e. twice). This patch excludes cdata decrementing from resurrection branch and adds corresponding tests. Resolves tarantool/tarantool#5820 Follows up tarantool/tarantool#5187 Reviewed-by: Igor Munkin <[email protected]> Reviewed-by: Sergey Ostanevich <[email protected]> Signed-off-by: Igor Munkin <[email protected]> (cherry picked from commit 82932be)
- Loading branch information
1 parent
45f7912
commit 2779973
Showing
4 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters