fix(profiling-ffi): Potential panic case#1955
fix(profiling-ffi): Potential panic case#1955gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomainfrom
Conversation
4b85da4 to
f9980e1
Compare
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1955 +/- ##
==========================================
+ Coverage 71.80% 71.85% +0.04%
==========================================
Files 434 434
Lines 70607 70615 +8
==========================================
+ Hits 50697 50738 +41
+ Misses 19910 19877 -33
🚀 New features to boost your workflow:
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: f9980e1 | Docs | Datadog PR Page | Give us feedback! |
yannham
left a comment
There was a problem hiding this comment.
Shouldn't we use catch_panic! instead? This is one possible panic, but there are just so many possibilities given this function calls to a bunch of subfunctions as well...
@yannham yes, this has never been decided for If we go that way we should do it for all the APIs and in another review |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
yannham
left a comment
There was a problem hiding this comment.
I'm fine either way, if you need a stamp as hotfix for this bug 👍 It's just that if you were to go the catch_panic! route, this change should probably be reverted, because it would be both unneeded and meaningless to give this very specific panic a special treatment.
What does this PR do?
Fix a potential crash site.
Motivation
A crash report gave us this callstack
One possible cause is that
into_slicemay have panicked.In any case, we should do the same as what the dictionary-based API is doing.