opentelemetry-go: add new fuzz tests and change fuzzer naming pattern#14250
Merged
AdamKorcz merged 5 commits intogoogle:masterfrom Nov 5, 2025
Merged
opentelemetry-go: add new fuzz tests and change fuzzer naming pattern#14250AdamKorcz merged 5 commits intogoogle:masterfrom
AdamKorcz merged 5 commits intogoogle:masterfrom
Conversation
|
pellared has previously contributed to projects/opentelemetry-go-contrib. The previous PR was #14234 |
pellared
commented
Nov 5, 2025
Comment on lines
+21
to
+23
| # Mitigate the error: found packages attribute_test and attribute in /src/opentelemetry-go/attribute. | ||
| # Remove all Go files with *_test package before building the fuzzer. | ||
| grep -rl --include="*.go" '^package .*_test' . | xargs rm -f |
Contributor
Author
There was a problem hiding this comment.
Without this I got (from https://github.com/google/oss-fuzz/actions/runs/19094642663/job/54551813623):
Running go [build -buildmode c-archive -tags gofuzz_libfuzzer,libfuzzer,gofuzz -trimpath -gcflags all=-d=libfuzzer -gcflags syscall=-d=libfuzzer=0 -gcflags runtime/cgo=-d=libfuzzer=0 -gcflags runtime/pprof=-d=libfuzzer=0 -overlay /tmp/gofuzzbuild1941669612/ossFuzzOverlayFile.json1224461702 -o sdk_attribute_FuzzHashKVs.a ./main.346016195.go]
main.346016195.go:12:2: found packages attribute_test (benchmark_libFuzzer.go) and attribute (doc.go) in /src/opentelemetry-go/attribute
panic: exit status 1
goroutine 1 [running]:
main.main()
/tmp/go-118-fuzz-build/main.go:196 +0x140e
ERROR:__main__:Building fuzzers failed.
Contributor
Author
There was a problem hiding this comment.
There is already an issue that is related to this problem:
CC @AdamKorcz
Contributor
Author
dashpole
approved these changes
Nov 5, 2025
dmathieu
approved these changes
Nov 5, 2025
AdamKorcz
approved these changes
Nov 5, 2025
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.
This PR add new fuzzers and renames fuzzer binaries in the OpenTelemetry Go projects to include the module path as a prefix, improving clarity and avoiding name collisions.
Changes
projects/opentelemetry-go/build.sh
FuzzHashKVs,FuzzTraceIDFromHex, andFuzzSpanIDFromHexFuzzHashKVs→sdk_attribute_FuzzHashKVsFuzzGetBin→sdk_metric_internal_aggregate_FuzzGetBinFuzzTraceIDFromHex→trace_FuzzTraceIDFromHexFuzzSpanIDFromHex→trace_FuzzSpanIDFromHexprojects/opentelemetry-go-contrib/build.sh
FuzzYAMLWithEnvVarsFuzzJSON→otelconf_v0.3.0_FuzzJSONFuzzYAML→otelconf_v0.3.0_FuzzYAMLFuzzYAMLWithEnvVars→otelconf_v0.3.0_FuzzYAMLWithEnvVarsBenefits