Skip to content

Conversation

@igormunkin
Copy link
Member

LuaVela has the internal weak table to keep the mapping for GCcdata objects to their finalizers, which are set via ffi.gc. When GCcdata object becomes dead, there is still the key in this weak table until it's finalized by the Lua garbage collector (more precisely, until the next GCfinalize phase). When the table reallocation occurs, these keys are copied intact to the new hash part.

LuaVela uses copyTV for such move, but there is just a plain pointer assignment in LuaJIT. As a result, the assertion within tvchecklive (to be more precisely within isdead check) hits.

This patch replaces copyTV with the simple pointer move.

Relates to tarantool/tarantool#5101

Co-authored-by: Igor Munkin imun@cpan.org
Signed-off-by: Igor Munkin imun@cpan.org

LuaVela has the internal weak table to keep the mapping for GCcdata
objects to their finalizers, which are set via <ffi.gc>. When GCcdata
object becomes dead, there is still the key in this weak table until
it's finalized by the Lua garbage collector (more precisely, until the
next GCfinalize phase). When the table reallocation occurs, these keys
are copied intact to the new hash part.

LuaVela uses <copyTV> for such move, but there is just a plain pointer
assignment in LuaJIT. As a result, the assertion within <tvchecklive>
(to be more precisely within <isdead> check) hits.

This patch replaces <copyTV> with the simple pointer move.

Relates to tarantool/tarantool#5101

Co-authored-by: Igor Munkin <imun@cpan.org>
Signed-off-by: Igor Munkin <imun@cpan.org>
igormunkin added a commit that referenced this pull request Apr 28, 2025
This patch removes Ubuntu 20.04 (Focal Fossa) from the supported
platforms, since GitHub announced its deprecation in GitHub Actions.
It became fully unsupported since 2025-04-15, that was discovered by
accident in precommit tests for #75.

Follows up actions/runner-images#11101

Signed-off-by: Igor Munkin <imun@cpan.org>
@igormunkin igormunkin force-pushed the imun/buristan-fix-lj_tab_newkey-for-dead-slots branch 2 times, most recently from e2f8a3b to 30e7c97 Compare April 29, 2025 06:34
@igormunkin igormunkin requested a review from igelhaus April 29, 2025 06:39
@igormunkin igormunkin marked this pull request as ready for review April 29, 2025 06:39
@igelhaus igelhaus merged commit 20d8e7b into master Apr 29, 2025
16 checks passed
@igormunkin igormunkin deleted the imun/buristan-fix-lj_tab_newkey-for-dead-slots branch April 30, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants