Skip to content

chore(crashtracking): preserve errno for crashtracker#1767

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomainfrom
gyuheon0h/PROF-14074-preserve-ct-errno
Mar 20, 2026
Merged

chore(crashtracking): preserve errno for crashtracker#1767
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomainfrom
gyuheon0h/PROF-14074-preserve-ct-errno

Conversation

@gyuheon0h
Copy link
Copy Markdown
Contributor

@gyuheon0h gyuheon0h commented Mar 19, 2026

What does this PR do?

saves errno prior to signal handling, and restores it before chaining

Motivation

We save/restore errno on signal handling. This is good practice; although this is in crash context

Additional Notes

using this crate: https://crates.io/crates/errno

Neat crate, cross platform, and compared to std libs errno utils:

This crate provides these extra features:
1. No heap allocations
2. Optional #![no_std] support
3. A set_errno function

How to test the change?

None as a unit test. Kind of hard to test the main signal hander function as a unit test. I could have made a with_errno_preserved wrapper around the signal handling function and write a test for the wrapper, but I felt that doing so would be more complexity vs the value it brings. However, no strong opinions on this; happy to implement if a second opinion thinks it is a good idea.

There is a bin test in a following PR: chore(crashtracking): add integration test for errno preservation

Copy link
Copy Markdown
Contributor Author

gyuheon0h commented Mar 19, 2026

@gyuheon0h gyuheon0h changed the title Preserve errno chore(crashtracking): preserve errno for crashtracker Mar 19, 2026
@github-actions
Copy link
Copy Markdown

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/gyuheon0h/PROF-14074-preserve-ct-errno

Summary by Rule

Rule Base Branch PR Branch Change

Annotation Counts by File

File Base Branch PR Branch Change

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 28 28 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 59 59 No change (0%)
libdd-common 10 10 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 19 19 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 9 9 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 208 208 No change (0%)

About This Report

This 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.

@gyuheon0h gyuheon0h marked this pull request as ready for review March 19, 2026 21:33
@gyuheon0h gyuheon0h requested review from a team as code owners March 19, 2026 21:33
@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 19, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-03-19 21:46:01

Comparing candidate commit b5d393a in PR branch gyuheon0h/PROF-14074-preserve-ct-errno with baseline commit c6ef98e in branch main.

Found 2 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 2 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:credit_card/is_card_number/378282246310005

  • 🟩 execution_time [-14.529µs; -14.462µs] or [-18.285%; -18.201%]
  • 🟩 throughput [+2801367.872op/s; +2815471.015op/s] or [+22.259%; +22.371%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 13.911ms 13.966ms ± 0.032ms 13.962ms ± 0.013ms 13.975ms 14.011ms 14.094ms 14.115ms 1.10% 2.249 7.099 0.23% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [13.962ms; 13.971ms] or [-0.032%; +0.032%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 35.149µs 35.533µs ± 0.648µs 35.231µs ± 0.046µs 35.351µs 36.861µs 36.918µs 38.755µs 10.00% 1.934 2.964 1.82% 0.046µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [35.444µs; 35.623µs] or [-0.253%; +0.253%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 17.643µs 25.897µs ± 9.645µs 18.012µs ± 0.251µs 34.259µs 43.107µs 44.723µs 63.474µs 252.40% 0.796 -0.030 37.15% 0.682µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [24.560µs; 27.234µs] or [-5.162%; +5.162%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2598 execution_time 3.410ms 3.437ms ± 0.016ms 3.434ms ± 0.010ms 3.445ms 3.468ms 3.474ms 3.512ms 2.27% 1.017 1.848 0.46% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2598 execution_time [3.435ms; 3.439ms] or [-0.063%; +0.063%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 495.494µs 496.147µs ± 0.459µs 496.080µs ± 0.249µs 496.336µs 496.717µs 497.010µs 500.308µs 0.85% 3.937 32.156 0.09% 0.032µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1998770.090op/s 2015531.531op/s ± 1858.620op/s 2015801.984op/s ± 1010.275op/s 2016759.947op/s 2017569.545op/s 2017979.147op/s 2018187.909op/s 0.12% -3.886 31.541 0.09% 131.424op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 369.795µs 370.331µs ± 0.369µs 370.301µs ± 0.170µs 370.476µs 370.767µs 371.274µs 373.953µs 0.99% 4.932 44.945 0.10% 0.026µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2674131.913op/s 2700292.521op/s ± 2677.406op/s 2700504.536op/s ± 1237.159op/s 2701733.761op/s 2703213.137op/s 2704065.129op/s 2704199.704op/s 0.14% -4.865 44.073 0.10% 189.321op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 168.771µs 169.059µs ± 0.143µs 169.034µs ± 0.092µs 169.152µs 169.276µs 169.472µs 169.574µs 0.32% 0.680 0.591 0.08% 0.010µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5897143.396op/s 5915098.573op/s ± 5005.813op/s 5915978.115op/s ± 3215.939op/s 5918419.474op/s 5922293.464op/s 5923937.687op/s 5925172.240op/s 0.16% -0.675 0.577 0.08% 353.964op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.832µs 37.040µs ± 0.121µs 37.056µs ± 0.113µs 37.151µs 37.210µs 37.244µs 37.318µs 0.71% -0.057 -1.307 0.33% 0.009µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26796810.377op/s 26997981.525op/s ± 88190.643op/s 26986462.170op/s ± 81971.441op/s 27088506.696op/s 27125326.374op/s 27134930.131op/s 27150034.832op/s 0.61% 0.064 -1.310 0.33% 6236.020op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 46.181µs 46.277µs ± 0.063µs 46.266µs ± 0.026µs 46.293µs 46.371µs 46.467µs 46.814µs 1.18% 3.700 26.024 0.14% 0.004µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21361205.682op/s 21608930.897op/s ± 29207.910op/s 21614187.459op/s ± 11961.040op/s 21624198.230op/s 21640603.308op/s 21652136.428op/s 21653774.041op/s 0.18% -3.643 25.364 0.13% 2065.311op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [496.084µs; 496.211µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [2015273.944op/s; 2015789.118op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [370.279µs; 370.382µs] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2699921.458op/s; 2700663.584op/s] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [169.039µs; 169.079µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5914404.816op/s; 5915792.331op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.023µs; 37.057µs] or [-0.045%; +0.045%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26985759.150op/s; 27010203.900op/s] or [-0.045%; +0.045%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [46.269µs; 46.286µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21604882.961op/s; 21612978.832op/s] or [-0.019%; +0.019%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 50.013ms 50.311ms ± 1.263ms 50.144ms ± 0.031ms 50.179ms 50.305ms 54.523ms 62.635ms 24.91% 8.982 81.918 2.50% 0.089ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [50.136ms; 50.486ms] or [-0.348%; +0.348%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 85.232µs 85.581µs ± 0.276µs 85.561µs ± 0.056µs 85.622µs 85.736µs 85.856µs 89.142µs 4.19% 10.819 136.632 0.32% 0.020µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [85.543µs; 85.620µs] or [-0.045%; +0.045%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 4.341ms 4.345ms ± 0.003ms 4.344ms ± 0.001ms 4.346ms 4.349ms 4.351ms 4.373ms 0.67% 5.090 45.951 0.07% 0.000ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [4.344ms; 4.345ms] or [-0.009%; +0.009%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.323µs 2.381µs ± 0.015µs 2.379µs ± 0.005µs 2.387µs 2.410µs 2.421µs 2.429µs 2.06% -0.061 2.799 0.62% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.379µs; 2.383µs] or [-0.086%; +0.086%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.896µs 3.914µs ± 0.003µs 3.914µs ± 0.002µs 3.916µs 3.918µs 3.920µs 3.927µs 0.32% -0.723 7.631 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 254669437.874op/s 255479047.160op/s ± 189005.565op/s 255479273.276op/s ± 123563.919op/s 255606530.753op/s 255722019.040op/s 255795435.293op/s 256662815.051op/s 0.46% 0.743 7.726 0.07% 13364.712op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 74.483µs 76.303µs ± 0.825µs 76.282µs ± 0.574µs 76.837µs 77.692µs 78.113µs 78.609µs 3.05% 0.172 -0.449 1.08% 0.058µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12721250.217op/s 13107184.199op/s ± 141550.574op/s 13109277.437op/s ± 98974.786op/s 13213195.478op/s 13326600.257op/s 13388626.622op/s 13425801.233op/s 2.41% -0.123 -0.477 1.08% 10009.137op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 68.470µs 68.669µs ± 0.099µs 68.666µs ± 0.062µs 68.729µs 68.829µs 68.901µs 69.172µs 0.74% 0.713 2.422 0.14% 0.007µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 14456750.946op/s 14562543.427op/s ± 21022.266op/s 14563201.704op/s ± 13175.091op/s 14575802.717op/s 14596483.345op/s 14601373.362op/s 14604930.625op/s 0.29% -0.696 2.347 0.14% 1486.499op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.893µs 3.912µs ± 0.002µs 3.912µs ± 0.001µs 3.914µs 3.916µs 3.917µs 3.919µs 0.18% -2.314 18.823 0.06% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255143793.750op/s 255593006.612op/s ± 163235.490op/s 255595937.939op/s ± 89101.323op/s 255680862.251op/s 255792984.007op/s 255888852.077op/s 256899149.840op/s 0.51% 2.344 19.103 0.06% 11542.492op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 64.699µs 64.962µs ± 0.193µs 64.907µs ± 0.079µs 65.002µs 65.396µs 65.512µs 65.876µs 1.49% 1.913 4.337 0.30% 0.014µs 1 200
credit_card/is_card_number/378282246310005 throughput 15180068.137op/s 15393762.422op/s ± 45533.930op/s 15406550.894op/s ± 18698.060op/s 15421505.289op/s 15439198.583op/s 15448699.483op/s 15456167.713op/s 0.32% -1.890 4.209 0.30% 3219.735op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 45.382µs 45.734µs ± 0.117µs 45.744µs ± 0.085µs 45.825µs 45.908µs 45.949µs 45.971µs 0.49% -0.470 -0.217 0.26% 0.008µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 21753042.968op/s 21865675.588op/s ± 56234.198op/s 21860597.366op/s ± 40487.113op/s 21902091.120op/s 21966285.689op/s 21991756.504op/s 22035188.082op/s 0.80% 0.482 -0.201 0.26% 3976.358op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.430µs 6.437µs ± 0.004µs 6.436µs ± 0.002µs 6.439µs 6.445µs 6.449µs 6.453µs 0.26% 0.985 1.473 0.06% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 154968552.054op/s 155349718.166op/s ± 96945.053op/s 155366557.350op/s ± 55439.025op/s 155409293.476op/s 155484940.646op/s 155500470.886op/s 155521649.034op/s 0.10% -0.980 1.460 0.06% 6855.050op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.896µs 3.913µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.918µs 3.921µs 3.923µs 0.26% -0.040 5.194 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254918450.032op/s 255567582.094op/s ± 195331.636op/s 255593840.189op/s ± 111565.583op/s 255697874.767op/s 255773863.572op/s 255857153.405op/s 256681553.393op/s 0.43% 0.056 5.265 0.08% 13812.032op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 61.667µs 62.762µs ± 0.505µs 62.758µs ± 0.343µs 63.090µs 63.588µs 63.933µs 64.318µs 2.49% 0.211 -0.083 0.80% 0.036µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15547793.967op/s 15934280.781op/s ± 127956.302op/s 15934198.244op/s ± 86698.710op/s 16024584.116op/s 16134312.400op/s 16189713.385op/s 16216248.539op/s 1.77% -0.167 -0.132 0.80% 9047.877op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 53.992µs 54.295µs ± 0.109µs 54.288µs ± 0.059µs 54.339µs 54.464µs 54.568µs 54.904µs 1.13% 1.720 8.106 0.20% 0.008µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 18213688.108op/s 18418070.663op/s ± 36994.285op/s 18420297.216op/s ± 19958.051op/s 18441248.498op/s 18467486.886op/s 18486381.545op/s 18521319.891op/s 0.55% -1.677 7.851 0.20% 2615.891op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.890µs 3.913µs ± 0.003µs 3.912µs ± 0.001µs 3.914µs 3.917µs 3.919µs 3.920µs 0.19% -2.173 18.832 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255098172.392op/s 255575568.033op/s ± 182702.405op/s 255592817.153op/s ± 97518.128op/s 255672962.587op/s 255803540.335op/s 255842559.850op/s 257037055.355op/s 0.57% 2.208 19.151 0.07% 12919.011op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 50.221µs 50.483µs ± 0.129µs 50.472µs ± 0.069µs 50.538µs 50.693µs 50.954µs 50.982µs 1.01% 1.273 3.076 0.25% 0.009µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 19614851.064op/s 19808924.384op/s ± 50408.770op/s 19813070.158op/s ± 27072.705op/s 19841272.814op/s 19876704.804op/s 19899910.610op/s 19912138.440op/s 0.50% -1.247 2.987 0.25% 3564.438op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 45.392µs 45.699µs ± 0.141µs 45.711µs ± 0.106µs 45.810µs 45.914µs 45.954µs 45.991µs 0.61% -0.213 -0.788 0.31% 0.010µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 21743226.985op/s 21882476.635op/s ± 67504.582op/s 21876731.921op/s ± 50507.832op/s 21936433.691op/s 21997075.531op/s 22023329.341op/s 22030555.274op/s 0.70% 0.223 -0.783 0.31% 4773.295op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.429µs 6.436µs ± 0.004µs 6.436µs ± 0.003µs 6.438µs 6.442µs 6.445µs 6.448µs 0.19% 0.462 -0.069 0.06% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 155085873.563op/s 155371648.263op/s ± 88791.529op/s 155378006.244op/s ± 60526.968op/s 155438921.908op/s 155499586.605op/s 155521983.052op/s 155551553.879op/s 0.11% -0.459 -0.073 0.06% 6278.509op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.914µs; 3.915µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [255452852.807op/s; 255505241.514op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [76.189µs; 76.417µs] or [-0.150%; +0.150%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [13087566.651op/s; 13126801.747op/s] or [-0.150%; +0.150%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [68.656µs; 68.683µs] or [-0.020%; +0.020%] None None None
credit_card/is_card_number/ 378282246310005 throughput [14559629.943op/s; 14565456.910op/s] or [-0.020%; +0.020%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.913µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631 throughput [255570383.743op/s; 255615629.481op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/378282246310005 execution_time [64.935µs; 64.989µs] or [-0.041%; +0.041%] None None None
credit_card/is_card_number/378282246310005 throughput [15387451.857op/s; 15400072.987op/s] or [-0.041%; +0.041%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [45.718µs; 45.750µs] or [-0.036%; +0.036%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [21857882.069op/s; 21873469.107op/s] or [-0.036%; +0.036%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.437µs; 6.438µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/x371413321323331 throughput [155336282.514op/s; 155363153.818op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ throughput [255540511.008op/s; 255594653.180op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [62.692µs; 62.832µs] or [-0.111%; +0.111%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15916547.268op/s; 15952014.293op/s] or [-0.111%; +0.111%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [54.280µs; 54.310µs] or [-0.028%; +0.028%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [18412943.611op/s; 18423197.715op/s] or [-0.028%; +0.028%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255550247.237op/s; 255600888.830op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [50.465µs; 50.500µs] or [-0.035%; +0.035%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [19801938.214op/s; 19815910.555op/s] or [-0.035%; +0.035%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [45.680µs; 45.719µs] or [-0.043%; +0.043%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [21873121.150op/s; 21891832.121op/s] or [-0.043%; +0.043%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.436µs; 6.437µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [155359342.611op/s; 155383953.915op/s] or [-0.008%; +0.008%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 159.650µs 160.789µs ± 0.370µs 160.730µs ± 0.135µs 160.903µs 161.268µs 161.674µs 164.372µs 2.27% 4.776 43.166 0.23% 0.026µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [160.738µs; 160.841µs] or [-0.032%; +0.032%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 186.215µs 186.591µs ± 0.168µs 186.580µs ± 0.124µs 186.718µs 186.867µs 186.990µs 187.072µs 0.26% 0.283 -0.388 0.09% 0.012µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5345543.267op/s 5359321.658op/s ± 4816.073op/s 5359635.566op/s ± 3555.174op/s 5362968.561op/s 5366144.013op/s 5369452.618op/s 5370130.902op/s 0.20% -0.279 -0.391 0.09% 340.548op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.885µs 17.975µs ± 0.036µs 17.971µs ± 0.024µs 18.000µs 18.034µs 18.055µs 18.112µs 0.78% 0.315 0.332 0.20% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55212910.727op/s 55632291.116op/s ± 110981.489op/s 55644841.914op/s ± 75207.448op/s 55710293.396op/s 55808542.572op/s 55868133.281op/s 55913038.780op/s 0.48% -0.302 0.311 0.20% 7847.576op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.575µs 10.700µs ± 0.051µs 10.705µs ± 0.033µs 10.733µs 10.772µs 10.819µs 10.864µs 1.48% -0.173 -0.037 0.47% 0.004µs 1 200
normalization/normalize_name/normalize_name/good throughput 92048668.642op/s 93456742.313op/s ± 445388.082op/s 93413763.575op/s ± 284686.833op/s 93742310.279op/s 94209129.122op/s 94530788.115op/s 94566509.271op/s 1.23% 0.201 -0.050 0.48% 31493.693op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [186.568µs; 186.614µs] or [-0.012%; +0.012%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5358654.197op/s; 5359989.120op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.970µs; 17.980µs] or [-0.028%; +0.028%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [55616910.149op/s; 55647672.083op/s] or [-0.028%; +0.028%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.693µs; 10.707µs] or [-0.066%; +0.066%] None None None
normalization/normalize_name/normalize_name/good throughput [93395015.809op/s; 93518468.818op/s] or [-0.066%; +0.066%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
single_flag_killswitch/rules-based execution_time 190.635ns 192.915ns ± 1.936ns 192.838ns ± 1.293ns 193.750ns 196.239ns 198.873ns 203.166ns 5.36% 1.528 4.018 1.00% 0.137ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
single_flag_killswitch/rules-based execution_time [192.647ns; 193.184ns] or [-0.139%; +0.139%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 739.339µs 740.737µs ± 0.924µs 740.585µs ± 0.365µs 740.964µs 741.975µs 744.943µs 746.200µs 0.76% 3.041 13.467 0.12% 0.065µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [740.609µs; 740.865µs] or [-0.017%; +0.017%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.224µs 3.234µs ± 1.438µs 3.008µs ± 0.028µs 3.033µs 3.682µs 14.369µs 14.672µs 387.78% 7.302 54.560 44.36% 0.102µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.035µs; 3.434µs] or [-6.163%; +6.163%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 12.967ms 12.994ms ± 0.014ms 12.992ms ± 0.009ms 13.001ms 13.018ms 13.035ms 13.056ms 0.49% 1.022 2.123 0.11% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [12.992ms; 12.996ms] or [-0.015%; +0.015%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_timestamped_x1000 execution_time 4.266ms 4.270ms ± 0.008ms 4.269ms ± 0.001ms 4.270ms 4.274ms 4.278ms 4.378ms 2.57% 12.022 156.876 0.19% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_timestamped_x1000 execution_time [4.268ms; 4.271ms] or [-0.026%; +0.026%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 237.333ns 247.618ns ± 13.424ns 241.847ns ± 3.229ns 250.574ns 281.430ns 287.319ns 288.471ns 19.28% 1.860 2.341 5.41% 0.949ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [245.757ns; 249.478ns] or [-0.751%; +0.751%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sdk_test_data/rules-based execution_time 144.385µs 146.306µs ± 1.593µs 146.000µs ± 0.462µs 146.576µs 148.099µs 151.862µs 161.224µs 10.43% 5.667 43.772 1.09% 0.113µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sdk_test_data/rules-based execution_time [146.086µs; 146.527µs] or [-0.151%; +0.151%] None None None

Group 20

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz b5d393a 1773955698 gyuheon0h/PROF-14074-preserve-ct-errno
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 5.014µs 5.083µs ± 0.038µs 5.065µs ± 0.026µs 5.118µs 5.148µs 5.152µs 5.154µs 1.76% 0.443 -1.190 0.74% 0.003µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.078µs; 5.088µs] or [-0.102%; +0.102%] None None None

Baseline

Omitted due to size.

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts bot commented Mar 19, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.70 MB 8.70 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 100.37 MB 100.38 MB +0% (+592 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 117.04 MB 117.04 MB +0% (+152 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.28 MB 11.28 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 27.18 MB 27.18 MB +0% (+1.00 KB) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 77.50 KB 77.50 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 186.12 MB 186.12 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 917.27 MB 916.08 MB --.12% (-1.19 MB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.94 MB 9.94 MB +0% (+1.00 KB) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 77.50 KB 77.50 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.78 MB 24.77 MB --.03% (-8.00 KB) 💪
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 51.47 MB 51.53 MB +.11% (+63.18 KB) 🔍
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.97 MB 23.00 MB +.09% (+23.50 KB) 🔍
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 78.71 KB 78.71 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.29 MB 190.41 MB +.06% (+120.00 KB) 🔍
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 900.94 MB 901.67 MB +.08% (+748.67 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.54 MB 7.54 MB --.01% (-1.50 KB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 78.71 KB 78.71 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.52 MB 26.52 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 47.09 MB 47.15 MB +.12% (+62.64 KB) 🔍
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 87.59 MB 87.59 MB +0% (+1.22 KB) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 10.22 MB 10.22 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 109.92 MB 109.92 MB -0% (-152 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.97 MB 11.97 MB -0% (-8 B) 👌

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.27%. Comparing base (c6ef98e) to head (b5d393a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1767      +/-   ##
==========================================
- Coverage   71.28%   71.27%   -0.01%     
==========================================
  Files         431      431              
  Lines       64585    64587       +2     
==========================================
- Hits        46038    46036       -2     
- Misses      18547    18551       +4     
Components Coverage Δ
libdd-crashtracker 64.82% <0.00%> (-0.12%) ⬇️
libdd-crashtracker-ffi 34.09% <ø> (-0.77%) ⬇️
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 87.99% <ø> (ø)
libdd-data-pipeline-ffi 75.20% <ø> (ø)
libdd-common 79.87% <ø> (ø)
libdd-common-ffi 73.87% <ø> (ø)
libdd-telemetry 62.48% <ø> (ø)
libdd-telemetry-ffi 16.75% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 80.29% <ø> (ø)
libdd-profiling 81.61% <ø> (ø)
libdd-profiling-ffi 64.94% <ø> (ø)
datadog-sidecar 31.67% <ø> (+0.06%) ⬆️
datdog-sidecar-ffi 9.01% <ø> (+0.30%) ⬆️
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 91.80% <ø> (ø)
libdd-trace-protobuf 68.25% <ø> (ø)
libdd-trace-utils 89.05% <ø> (ø)
datadog-tracer-flare 86.88% <ø> (ø)
libdd-log 74.69% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danielsn
Copy link
Copy Markdown
Contributor

Do we have tests for chaining crash handlers? If so, we could make one of them set errno to a known value, then check that it still has that value after our crash-handler runs. If we don't have tests for chaining crash handlers, we should add some (but in a different PR)

@gyuheon0h
Copy link
Copy Markdown
Contributor Author

gyuheon0h commented Mar 20, 2026

Do we have tests for chaining crash handlers? If so, we could make one of them set errno to a known value, then check that it still has that value after our crash-handler runs. If we don't have tests for chaining crash handlers, we should add some (but in a different PR)

@danielsn

We have integration test (bin_test) that tests chaining handlers, but it is very minimal and designed to be run as a minimal bin test.

However, to test errno preservation, at the minimum, we will need to install a handler that will be chained after the ct signal handler, set an errno, then in the chained handler, check the errno and somehow emit that so that the post-test verifiers can verify that the errno seen by the chained handler is the same as the one set before the crash. This means that we will have to rip out the existing chained handler bin tests from their "simple tests" harness. I don't want to do that since it means breaking existing clean category of tests just to add another verification step, so I made a new PR on top of this one to do this in a separate bin test.

The PR is here: chore(crashtracking): add integration test for errno preservation

@gyuheon0h gyuheon0h requested a review from danielsn March 20, 2026 03:22
Copy link
Copy Markdown
Contributor

@gleocadie gleocadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit b15cd20 into main Mar 20, 2026
108 of 111 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the gyuheon0h/PROF-14074-preserve-ct-errno branch March 20, 2026 16:38
gh-worker-dd-mergequeue-cf854d bot pushed a commit that referenced this pull request Mar 20, 2026
)

# What does this PR do?

Adds an integration test that checks that errno is preserved before and after the crashtracker signal handler

# Motivation

Its good practice to maintain errno, especially in the potential case chained handlers do something with it
This was done in [chore(crashtracking): preserve errno for crashtracker](#1767). We should test this.

# Additional Notes

There already exists integration tests that chain handlers. However, this test introduces file writing and verifying logic. I do not want to rip out the existing chained handler tests from the "simple test" harness. The added upside of this is that this lets us write a test to test a specific flow and keep each test atomic in its responsibility, instead of complicating the verification logic.

# How to test the change?

Run the bin test

Co-authored-by: gyuheon.oh <[email protected]>
bwoebi added a commit that referenced this pull request Mar 20, 2026
…-unprocessed

* 'main' of github.com:DataDog/libdatadog:
  chore(build): ekump/APMSP-2718 update aws-lc dependencies (#1751)
  chore(crashtracking): add integration test for errno preservation (#1768)
  chore(crashtracking): preserve errno for crashtracker (#1767)
  chore(examples): add compilation flags to prevent logic errors (#1766)
  feat(agents)!: retrieve container tags hash from /info endpoint (#1700)
  fix(ci): handle new crate addition in semver-check (#1769)
  fix(obfuscation/redis): fuzzer fixes [APMSP-2670] (#1694)
  fix(obfuscation/http)!: fuzzer fixes [APMSP-2670] (#1684)
  ci: add Datadog code coverage upload (#1718)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants