Repository navigation
Fix hot reload with libstdc++ involved - #1715
Merged
Merged
Conversation
Dependencies with C++ code pull in libstdc++, which is never unloaded by glibc. The hot-reload crate now has a `cpp-dependency` feature. This links libstdc++, reproducing hot-reload failures.
Godot loads extensions with `RTLD_DEEPBIND`, so libstdc++ resolved its `__cxa_thread_atexit_impl` import to our exported override instead of glibc's own one. libstdc++ is not unloaded -> extension stays pinned, statics become stale. Now hides the symbol via asm trampoline (no stable way). Rust std still links to it. Re-initialization without unload now panics, also in release builds.
|
API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1715 |
|
Checked on my end, this fixes the issue and my project now editor hotreloads. Thank you! @Bromeon |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1209.
I reproduced the behavior and attempted a fix. It needed a bit of hacking with exported symbols (including
global_asm!due to no stable Rust way), but seems to work.@AJ213 please see if this fixes things for you.