-
Notifications
You must be signed in to change notification settings - Fork 15
Prevent span start overflow panic #1373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: VianneyRuhlmann <169818982+VianneyRuhlmann@users.noreply.github.com>
|
Bits AI Dev Agent Status: ✅ Done [Fix CI Errors] You can ask for changes by mentioning @DataDog in a comment. |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 3fa0c53 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksComparisonBenchmark execution time: 2025-11-26 17:43:47 Comparing candidate commit 3fa0c53 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 54 metrics, 2 unstable metrics. scenario:tags/replace_trace_tags
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
BaselineOmitted due to size. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1373 +/- ##
=======================================
Coverage 71.22% 71.23%
=======================================
Files 395 395
Lines 63292 63305 +13
=======================================
+ Hits 45079 45094 +15
+ Misses 18213 18211 -2
🚀 New features to boost your workflow:
|
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-apple-darwin
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-apple-darwin
x86_64-unknown-linux-gnu
|
for Dev Agent Session identified by Workflow Automation
You can ask for changes by mentioning @DataDog in a comment.
Feedback (especially what can be better) welcome in #code-gen-feedback!
What does this PR do?
i64::MINstart valuenormalize_span_start_durationwithchecked_addto avoid overflowing when computingstart + durationMotivation
A libFuzzer input produced an overflow panic in
normalize_span_start_durationwhenstartwas near negative, because we were subtracting fromi64::MAXbefore clamping the duration.Additional Notes
cargo test -p libdd-trace-normalizationcurrently cannot run in this sandbox because Cargo attempts to fetch the patchedproptestgit dependency from GitHub, but the environment has no network access.How to test the change?
Run
cargo test -p libdd-trace-normalization test_normalize_span_start_duration_handles_min_startin an environment that can download the workspace dependencies.