Repository navigation
Tests: define the static data members the test headers declare - #56
Merged
Merged
Conversation
adalisk-emikhaylov
requested changes
Oct 14, 2026
adalisk-emikhaylov
left a comment
Collaborator
There was a problem hiding this comment.
Make them inline instead to avoid an extra file.
Fedr
force-pushed
the
test-static-members
branch
from
October 14, 2026 20:00
8e90310 to
abff24c
Compare
Without definitions libbleh.so has undefined data symbols, so it can't be loaded eagerly (dlopen with RTLD_NOW, and the loaders of the languages that bind the whole library at once). Functions resolve lazily, data doesn't, which is why the C# tests never noticed. They're inline, so no extra file is needed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Fedr
force-pushed
the
test-static-members
branch
from
October 14, 2026 20:45
abff24c to
8fb58bd
Compare
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.
The test headers declare
MR::MemberVars::A::zandwandMR::MatchingLayout::A::xwithout defining them, so the test library has undefined data symbols. That doesn't bother the C# tests, sinceDllImportbinds functions lazily, but it makeslibbleh.sofail to load eagerly:dlopenwithRTLD_NOW, or the loaders of languages that bind the whole library at once (data symbols are always resolved at load time). Found while loading it from Rust and Java in #54 / #55.They're now
static inlinewith an initializer, so no extra source file is needed.🤖 Generated with Claude Code