Skip to content

purego: add a fuzz test for callback round trips - #531

Open
kumagi wants to merge 4 commits into
ebitengine:mainfrom
kumagi:fuzz-callback-roundtrip
Open

purego: add a fuzz test for callback round trips#531
kumagi wants to merge 4 commits into
ebitengine:mainfrom
kumagi:fuzz-callback-roundtrip

Conversation

@kumagi

@kumagi kumagi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

What issue is this addressing?

#528

What type of issue is this addressing?

feature

What this PR does | solves

Decode fuzzer bytes into callback signatures via a sequential opcode stream, compile a C forwarder once per content hash, and compare arguments and returns byte-for-byte through the real C ABI. Seeds run on every plain go test; new shapes are explored under go test -fuzz.

Decode fuzzer bytes into callback signatures via a sequential
opcode stream, compile a C forwarder once per content hash, and
compare arguments and returns byte-for-byte through the real C ABI.
Seeds run on every plain go test; new shapes are explored under
go test -fuzz.
Match callback_test.go: callbacks only exist on darwin and Linux
(plus 386-nocallback nuances handled at run time), so freebsd/netbsd
and windows must not compile this file. Fixes undefined purego.Dlopen
on Windows.
Same shared-/tmp hazard as the struct fuzz cache: CI minor-arches
runs several QEMU targets in sequence on one runner.
CI arm runs hard-float and soft-float back to back on one runner
sharing /tmp with different CCs under the same GOARCH.
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