Skip to content

Link a static call on a host interface without its missing glue - #445

Merged
dimensionscape merged 3 commits into
mainfrom
fix/cppia-static-call-no-host-glue
Nov 13, 2026
Merged

dimensionscape merged 3 commits into
mainfrom
fix/cppia-static-call-no-host-glue

Conversation

@dimensionscape

@dimensionscape dimensionscape commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The fuzz job's cppia target stopped on #442's run (job):

src/hx/cppia/Cppia.cpp:2144:53: runtime error: member call on null pointer of type 'hx::HaxeNativeClass'
    #0 hx::CallStatic::link(hx::CppiaModule&) src/hx/cppia/Cppia.cpp:2144:53
    #1 hx::ScriptCallable::link(hx::CppiaModule&) src/hx/cppia/CppiaFunction.cpp:186:17
    #2 hx::CppiaModule::link() src/hx/cppia/CppiaModule.cpp:209:38

#442 doesn't touch the loader, so the fuzzer just reached this there. A static call whose type has a host class looked the function up in the class's script glue, haxeBase, which a host interface doesn't have. Haxe gives an interface no statics, so only a malformed file makes such a call. It now goes on to the field lookup the other host classes fall back to.

The crashing input from that run is in test/fuzz/regressions/cppia/static-call-on-a-host-interface. Replayed here with test/fuzz/run.sh --replay cppia (MSVC x64), main's loader segfaults on it, and with this change all ten cppia inputs pass.

The fuzz job's cppia target stopped in CallStatic::link with "member call
on null pointer of type 'hx::HaxeNativeClass'", on #442's run. A static
call whose type had a host class looked the function up in that class's
script glue, haxeBase, which a host interface does not have. Haxe gives
an interface no statics, so only a malformed file makes such a call. It
goes on to the field lookup the other host classes fall back to, and the
file fails to load as for any other static that is not there.
The input from #442's fuzz run. Replayed with run.sh --replay cppia, main's loader segfaults on it and this branch's loads all ten cppia inputs.
@dimensionscape
dimensionscape merged commit 31ccfc1 into main Nov 13, 2026
37 checks passed
@dimensionscape
dimensionscape deleted the fix/cppia-static-call-no-host-glue branch November 13, 2026 15:36
@dimensionscape dimensionscape mentioned this pull request Nov 13, 2026
28 of 34 tasks
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.

1 participant