Skip to content

purego: add a fuzz test for struct ABI round trips - #530

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

purego: add a fuzz test for struct ABI round trips#530
kumagi wants to merge 4 commits into
ebitengine:mainfrom
kumagi:fuzz-struct-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 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.

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
kumagi force-pushed the fuzz-struct-roundtrip branch from 6a00021 to 6773c73 Compare September 7, 2026 18:10
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