purego: add a fuzz test for struct ABI round trips - #530
Open
kumagi wants to merge 4 commits into
Open
Conversation
Decode fuzzer bytes into struct shapes via a sequential opcode stream, compile the equivalent C once per content hash, and compare round trips byte-for-byte through the real C ABI. Seeds run on every plain go test; new shapes are explored under go test -fuzz.
Use internal/load instead of purego.Dlopen/Dlclose directly and match the struct_test.go build tags, since Dlopen does not exist on Windows.
CI minor-arches runs several QEMU targets in sequence on one runner with a shared /tmp; without the arch in the key a ppc64le run picks up a loong64 .so and Dlopen fails.
kumagi
force-pushed
the
fuzz-struct-roundtrip
branch
from
September 7, 2026 18:10
6a00021 to
6773c73
Compare
CI arm runs hard-float and soft-float back to back on one runner sharing /tmp with different CCs under the same GOARCH.
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.
What issue is this addressing?
#528
What type of issue is this addressing?
feature
What this PR does | solves
Decode fuzzer bytes into struct shapes via a sequential opcode stream, compile the equivalent C once per content hash, and compare round trips byte-for-byte through the real C ABI. Seeds run on every plain go test; new shapes are explored under go test -fuzz.