-
Notifications
You must be signed in to change notification settings - Fork 16
test(crashtracking): add minimal LD preload test for crashtracker collector #1428
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
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1428 +/- ##
==========================================
- Coverage 71.32% 71.27% -0.05%
==========================================
Files 413 413
Lines 66148 66182 +34
==========================================
- Hits 47180 47173 -7
- Misses 18968 19009 +41
🚀 New features to boost your workflow:
|
BenchmarksComparisonBenchmark execution time: 2026-01-12 22:03:57 Comparing candidate commit 775e692 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 2 unstable metrics. scenario:profile_add_sample2_frames_x1000
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
Group 18
Group 19
BaselineOmitted due to size. |
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
|
c9a32e0 to
5d2087f
Compare
bin_tests/preload/preload.c
Outdated
| } | ||
|
|
||
| void *ptr = real_malloc(size); | ||
| log_line("malloc", size, ptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a global atomic that controls whether to log, enabled when the signal handler is active disabled otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something similar with static __thread int dd_is_collector = 0; on line 26. This gets called on collector init
e2ed49c to
677bb4f
Compare

What does this PR do?
This PR adds a
runtime_preload_loggerbin test that runs the collector under an LD_PRELOAD interposer to capture dangerous calls into a per-test log.Details:
This is the first step in validating uses of unsafe operations. The next steps in following PRs are
Motivation
We want to validate all uses of non-signal-safe functions in the handler.
Additional Notes
Another design choice here will be to abort on the first call of an unsafe function and print the stacktrace.
How to test the change?
Log output when I added this code that allocates in some part of the collector emitter
Log output of the current collector (no in process symbolication, no runtime stacks collection); there are no logs because we don't do anything dangerous right now 🎉