Skip to content

Handle null pointer. #1141

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

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

hoolioh
Copy link
Contributor

@hoolioh hoolioh commented Jul 14, 2025

What does this PR do?

Avoids segfaulting if a null pointer is passed from the C side.

Motivation

Since the response is allocated upon a successful call to send, there could be situations in which the call could fail, not filling the response pointer and, depending on the user flow, the pointer could be passed to ddog_trace_exporter_response_free or ddog_trace_exporter_response_get_body without being checked, causing a segfault.

@pr-commenter
Copy link

pr-commenter bot commented Jul 14, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-07-16 07:11:27

Comparing candidate commit 2713e82 in PR branch julio/handle-null-pointer-on-exporter-response with baseline commit a9d660b in branch main.

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

scenario:concentrator/add_spans_to_concentrator

  • 🟥 execution_time [+873.601µs; +877.283µs] or [+10.527%; +10.572%]

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 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 72.569ms 72.818ms ± 0.124ms 72.796ms ± 0.042ms 72.839ms 73.052ms 73.310ms 73.495ms 0.96% 2.470 9.156 0.17% 0.009ms 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 [72.801ms; 72.835ms] or [-0.024%; +0.024%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 9.154ms 9.174ms ± 0.010ms 9.173ms ± 0.005ms 9.178ms 9.191ms 9.206ms 9.216ms 0.47% 1.189 2.950 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 [9.173ms; 9.175ms] or [-0.015%; +0.015%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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.898µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.916µs 3.918µs 3.931µs 0.48% 0.848 10.152 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 254369791.378op/s 255601820.505op/s ± 191169.342op/s 255603003.338op/s ± 112417.156op/s 255709207.014op/s 255872600.272op/s 255945555.941op/s 256541481.583op/s 0.37% -0.823 10.057 0.07% 13517.714op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 80.043µs 81.299µs ± 0.574µs 81.282µs ± 0.406µs 81.653µs 82.250µs 82.503µs 82.734µs 1.79% 0.220 -0.625 0.70% 0.041µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12086877.355op/s 12300840.211op/s ± 86712.928op/s 12302837.139op/s ± 61437.228op/s 12369912.715op/s 12426932.767op/s 12466843.952op/s 12493312.551op/s 1.55% -0.192 -0.642 0.70% 6131.530op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 75.248µs 75.690µs ± 0.155µs 75.658µs ± 0.080µs 75.764µs 75.957µs 76.090µs 76.472µs 1.08% 1.055 3.757 0.20% 0.011µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13076688.090op/s 13211880.268op/s ± 27061.326op/s 13217313.150op/s ± 14020.199op/s 13229258.196op/s 13240945.715op/s 13278848.701op/s 13289410.997op/s 0.55% -1.027 3.660 0.20% 1913.525op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.892µs 3.911µs ± 0.003µs 3.911µs ± 0.002µs 3.913µs 3.915µs 3.918µs 3.920µs 0.23% -1.067 11.009 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255123726.527op/s 255689572.841op/s ± 182306.683op/s 255699092.298op/s ± 113288.019op/s 255804649.696op/s 255906556.256op/s 255927904.313op/s 256960855.526op/s 0.49% 1.093 11.185 0.07% 12891.029op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 72.241µs 72.804µs ± 0.116µs 72.788µs ± 0.051µs 72.850µs 73.009µs 73.090µs 73.103µs 0.43% -0.264 3.048 0.16% 0.008µs 1 200
credit_card/is_card_number/378282246310005 throughput 13679392.897op/s 13735575.694op/s ± 21874.029op/s 13738446.950op/s ± 9580.143op/s 13746491.097op/s 13765061.247op/s 13796058.527op/s 13842478.414op/s 0.76% 0.287 3.121 0.16% 1546.727op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.618µs 52.844µs ± 0.078µs 52.840µs ± 0.054µs 52.896µs 52.978µs 53.004µs 53.065µs 0.43% 0.045 -0.186 0.15% 0.005µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 18844697.082op/s 18923651.293op/s ± 27755.192op/s 18925057.718op/s ± 19406.371op/s 18942422.612op/s 18969623.479op/s 18976481.892op/s 19004728.376op/s 0.42% -0.037 -0.186 0.15% 1962.588op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.427µs 6.437µs ± 0.006µs 6.435µs ± 0.004µs 6.440µs 6.449µs 6.453µs 6.455µs 0.30% 0.855 0.263 0.09% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 154926853.390op/s 155362081.628op/s ± 144152.224op/s 155391865.244op/s ± 96345.912op/s 155476821.101op/s 155538719.541op/s 155571150.549op/s 155602641.320op/s 0.14% -0.850 0.254 0.09% 10193.102op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.894µs 3.912µs ± 0.004µs 3.912µs ± 0.002µs 3.914µs 3.919µs 3.921µs 3.923µs 0.28% -0.051 2.906 0.09% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254895778.330op/s 255600095.892op/s ± 235716.926op/s 255609322.593op/s ± 153066.176op/s 255769217.568op/s 255900868.108op/s 255942336.701op/s 256811376.915op/s 0.47% 0.065 2.955 0.09% 16667.704op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.864µs 65.081µs ± 0.099µs 65.061µs ± 0.055µs 65.122µs 65.278µs 65.413µs 65.584µs 0.80% 1.790 5.441 0.15% 0.007µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15247517.204op/s 15365590.381op/s ± 23308.932op/s 15370119.720op/s ± 12929.699op/s 15381464.951op/s 15391148.244op/s 15395270.732op/s 15416867.595op/s 0.30% -1.771 5.333 0.15% 1648.190op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 58.157µs 58.282µs ± 0.083µs 58.263µs ± 0.047µs 58.320µs 58.458µs 58.593µs 58.625µs 0.62% 1.413 2.469 0.14% 0.006µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17057528.697op/s 17158121.821op/s ± 24396.560op/s 17163680.794op/s ± 13946.207op/s 17174125.463op/s 17186539.849op/s 17191888.283op/s 17194918.901op/s 0.18% -1.402 2.425 0.14% 1725.097op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.893µs 3.912µs ± 0.003µs 3.911µs ± 0.002µs 3.913µs 3.918µs 3.922µs 3.930µs 0.47% 0.946 9.833 0.09% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254463004.443op/s 255627216.563op/s ± 227014.154op/s 255664385.958op/s ± 115760.184op/s 255769140.795op/s 255846248.121op/s 255913200.010op/s 256882687.895op/s 0.48% -0.917 9.839 0.09% 16052.325op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 55.039µs 55.368µs ± 0.149µs 55.352µs ± 0.085µs 55.445µs 55.679µs 55.790µs 55.848µs 0.90% 0.782 0.777 0.27% 0.011µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17905721.135op/s 18060995.859op/s ± 48630.643op/s 18066226.104op/s ± 27855.629op/s 18091577.925op/s 18132159.473op/s 18148627.088op/s 18169016.827op/s 0.57% -0.764 0.746 0.27% 3438.706op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.690µs 52.871µs ± 0.064µs 52.867µs ± 0.043µs 52.916µs 52.966µs 53.008µs 53.087µs 0.42% 0.017 0.088 0.12% 0.005µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 18837147.211op/s 18914146.773op/s ± 23025.169op/s 18915346.265op/s ± 15523.877op/s 18928837.040op/s 18947846.433op/s 18970220.358op/s 18978908.739op/s 0.34% -0.009 0.086 0.12% 1628.125op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.426µs 6.435µs ± 0.005µs 6.435µs ± 0.003µs 6.438µs 6.444µs 6.448µs 6.455µs 0.32% 0.909 1.575 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 154907101.095op/s 155395326.622op/s ± 113361.159op/s 155398756.817op/s ± 72347.894op/s 155479761.120op/s 155550291.148op/s 155605606.667op/s 155610852.705op/s 0.14% -0.903 1.555 0.07% 8015.844op/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.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [255575326.273op/s; 255628314.738op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [81.220µs; 81.379µs] or [-0.098%; +0.098%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12288822.633op/s; 12312857.789op/s] or [-0.098%; +0.098%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [75.668µs; 75.711µs] or [-0.028%; +0.028%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13208129.829op/s; 13215630.708op/s] or [-0.028%; +0.028%] None None None
credit_card/is_card_number/37828224631 execution_time [3.911µs; 3.911µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631 throughput [255664306.888op/s; 255714838.794op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/378282246310005 execution_time [72.788µs; 72.820µs] or [-0.022%; +0.022%] None None None
credit_card/is_card_number/378282246310005 throughput [13732544.164op/s; 13738607.225op/s] or [-0.022%; +0.022%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.833µs; 52.855µs] or [-0.020%; +0.020%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [18919804.690op/s; 18927497.896op/s] or [-0.020%; +0.020%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.436µs; 6.437µs] or [-0.013%; +0.013%] None None None
credit_card/is_card_number/x371413321323331 throughput [155342103.516op/s; 155382059.740op/s] or [-0.013%; +0.013%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.912µs; 3.913µs] or [-0.013%; +0.013%] None None None
credit_card/is_card_number_no_luhn/ throughput [255567427.793op/s; 255632763.991op/s] or [-0.013%; +0.013%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [65.067µs; 65.094µs] or [-0.021%; +0.021%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15362359.987op/s; 15368820.775op/s] or [-0.021%; +0.021%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.270µs; 58.293µs] or [-0.020%; +0.020%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17154740.692op/s; 17161502.950op/s] or [-0.020%; +0.020%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.911µs; 3.912µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255595754.585op/s; 255658678.542op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [55.348µs; 55.389µs] or [-0.037%; +0.037%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18054256.119op/s; 18067735.598op/s] or [-0.037%; +0.037%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.862µs; 52.879µs] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [18910955.706op/s; 18917337.840op/s] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.435µs; 6.436µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [155379615.855op/s; 155411037.388op/s] or [-0.010%; +0.010%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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.412µs 2.434µs ± 0.016µs 2.430µs ± 0.008µs 2.439µs 2.475µs 2.481µs 2.508µs 3.18% 1.892 4.348 0.64% 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.432µs; 2.436µs] or [-0.089%; +0.089%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 534.520µs 535.788µs ± 0.684µs 535.762µs ± 0.290µs 536.036µs 536.427µs 536.765µs 542.779µs 1.31% 5.594 54.016 0.13% 0.048µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1842369.669op/s 1866413.334op/s ± 2365.950op/s 1866500.424op/s ± 1008.636op/s 1867571.032op/s 1869101.430op/s 1870121.552op/s 1870835.740op/s 0.23% -5.500 52.777 0.13% 167.298op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 382.259µs 383.085µs ± 0.366µs 383.090µs ± 0.252µs 383.321µs 383.698µs 384.023µs 384.122µs 0.27% 0.248 -0.271 0.10% 0.026µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2603342.028op/s 2610386.268op/s ± 2495.557op/s 2610355.757op/s ± 1715.291op/s 2612310.269op/s 2614306.900op/s 2615342.983op/s 2616024.554op/s 0.22% -0.244 -0.276 0.10% 176.463op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 195.349µs 195.858µs ± 0.256µs 195.843µs ± 0.143µs 195.988µs 196.214µs 196.377µs 197.929µs 1.07% 2.716 19.790 0.13% 0.018µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5052308.007op/s 5105752.386op/s ± 6663.061op/s 5106132.990op/s ± 3712.643op/s 5109589.432op/s 5114802.930op/s 5117028.220op/s 5119043.353op/s 0.25% -2.660 19.225 0.13% 471.150op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 38.130µs 38.221µs ± 0.036µs 38.221µs ± 0.026µs 38.246µs 38.287µs 38.305µs 38.331µs 0.29% 0.375 -0.181 0.09% 0.003µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26088410.829op/s 26163508.343op/s ± 24824.716op/s 26163625.290op/s ± 17891.615op/s 26182623.724op/s 26200663.128op/s 26207695.419op/s 26226224.289op/s 0.24% -0.371 -0.186 0.09% 1755.372op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.943µs 46.683µs ± 0.537µs 46.978µs ± 0.284µs 47.148µs 47.307µs 47.365µs 47.443µs 0.99% -0.256 -1.784 1.15% 0.038µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21077935.073op/s 21423951.460op/s ± 246967.587op/s 21286643.672op/s ± 128028.827op/s 21710055.983op/s 21736680.147op/s 21752157.663op/s 21766101.474op/s 2.25% 0.261 -1.786 1.15% 17463.246op/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 [535.693µs; 535.883µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1866085.437op/s; 1866741.232op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [383.035µs; 383.136µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2610040.407op/s; 2610732.128op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [195.822µs; 195.893µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5104828.950op/s; 5106675.822op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [38.216µs; 38.226µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26160067.876op/s; 26166948.810op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [46.609µs; 46.757µs] or [-0.159%; +0.159%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21389724.128op/s; 21458178.792op/s] or [-0.160%; +0.160%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 33.037µs 33.547µs ± 0.913µs 33.126µs ± 0.048µs 33.204µs 35.480µs 35.559µs 36.716µs 10.84% 1.733 1.183 2.72% 0.065µ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 [33.420µs; 33.674µs] or [-0.377%; +0.377%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 242.617ns 253.486ns ± 13.226ns 247.829ns ± 3.110ns 257.512ns 285.237ns 293.406ns 298.795ns 20.57% 1.695 1.835 5.20% 0.935ns 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 [251.653ns; 255.319ns] or [-0.723%; +0.723%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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.011µs 5.074µs ± 0.032µs 5.077µs ± 0.030µs 5.090µs 5.130µs 5.134µs 5.137µs 1.19% 0.174 -0.885 0.63% 0.002µ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.070µs; 5.079µs] or [-0.087%; +0.087%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 86.443µs 86.833µs ± 0.169µs 86.826µs ± 0.059µs 86.883µs 86.978µs 87.273µs 88.476µs 1.90% 5.511 48.591 0.19% 0.012µ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 [86.810µs; 86.856µs] or [-0.027%; +0.027%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 150.782µs 151.854µs ± 0.321µs 151.832µs ± 0.139µs 151.971µs 152.313µs 152.844µs 153.990µs 1.42% 2.023 12.143 0.21% 0.023µ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 [151.809µs; 151.898µs] or [-0.029%; +0.029%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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.201µs 3.198µs ± 1.413µs 2.976µs ± 0.028µs 3.002µs 3.631µs 13.907µs 14.646µs 392.06% 7.286 54.461 44.07% 0.100µ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.002µs; 3.394µs] or [-6.123%; +6.123%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 205.691µs 206.182µs ± 0.269µs 206.153µs ± 0.170µs 206.330µs 206.645µs 206.846µs 207.403µs 0.61% 0.918 1.954 0.13% 0.019µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4821521.604op/s 4850094.607op/s ± 6327.865op/s 4850776.673op/s ± 3993.498op/s 4854383.262op/s 4858949.649op/s 4860806.995op/s 4861656.953op/s 0.22% -0.906 1.905 0.13% 447.448op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.208µs 18.324µs ± 0.087µs 18.307µs ± 0.046µs 18.366µs 18.509µs 18.564µs 18.604µs 1.62% 1.072 0.846 0.48% 0.006µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 53752795.030op/s 54574368.636op/s ± 258859.322op/s 54623047.285op/s ± 138483.960op/s 54742149.920op/s 54908056.343op/s 54919965.955op/s 54921945.119op/s 0.55% -1.048 0.784 0.47% 18304.118op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.680µs 10.804µs ± 0.058µs 10.798µs ± 0.039µs 10.842µs 10.904µs 10.943µs 10.961µs 1.51% 0.338 -0.341 0.53% 0.004µs 1 200
normalization/normalize_name/normalize_name/good throughput 91228780.399op/s 92560029.972op/s ± 492739.366op/s 92607129.453op/s ± 334491.207op/s 92927744.874op/s 93289633.031op/s 93460398.406op/s 93632273.874op/s 1.11% -0.313 -0.364 0.53% 34841.935op/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 [206.145µs; 206.219µs] or [-0.018%; +0.018%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4849217.626op/s; 4850971.588op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.312µs; 18.336µs] or [-0.066%; +0.066%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [54538493.223op/s; 54610244.048op/s] or [-0.066%; +0.066%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.796µs; 10.812µs] or [-0.074%; +0.074%] None None None
normalization/normalize_name/normalize_name/good throughput [92491741.035op/s; 92628318.909op/s] or [-0.074%; +0.074%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 2713e82 1752649150 julio/handle-null-pointer-on-exporter-response
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 18.401µs 26.941µs ± 9.941µs 18.943µs ± 0.372µs 35.591µs 44.600µs 45.887µs 72.373µs 282.07% 0.926 0.792 36.81% 0.703µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [25.564µs; 28.319µs] or [-5.114%; +5.114%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.33%. Comparing base (a9d660b) to head (2713e82).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1141      +/-   ##
==========================================
- Coverage   71.33%   71.33%   -0.01%     
==========================================
  Files         343      343              
  Lines       52511    52523      +12     
==========================================
+ Hits        37461    37465       +4     
- Misses      15050    15058       +8     
Components Coverage Δ
datadog-crashtracker 43.89% <ø> (-0.03%) ⬇️
datadog-crashtracker-ffi 5.93% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 89.38% <100.00%> (+0.11%) ⬆️
data-pipeline-ffi 88.36% <100.00%> (+0.69%) ⬆️
ddcommon 82.88% <ø> (ø)
ddcommon-ffi 69.66% <ø> (ø)
ddtelemetry 60.08% <ø> (ø)
ddtelemetry-ffi 21.32% <ø> (ø)
dogstatsd-client 83.26% <ø> (ø)
datadog-ipc 82.58% <ø> (-0.11%) ⬇️
datadog-profiling 77.13% <ø> (ø)
datadog-profiling-ffi 62.12% <ø> (ø)
datadog-sidecar 40.28% <ø> (ø)
datdog-sidecar-ffi 5.17% <ø> (ø)
spawn-worker 55.35% <ø> (ø)
tinybytes 90.96% <ø> (ø)
datadog-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <ø> (ø)
datadog-trace-protobuf 77.10% <ø> (ø)
datadog-trace-utils 89.17% <ø> (ø)
datadog-tracer-flare 78.54% <ø> (ø)
datadog-log 76.31% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hoolioh hoolioh marked this pull request as ready for review July 14, 2025 08:07
@hoolioh hoolioh requested a review from a team as a code owner July 14, 2025 08:07
@ekump
Copy link
Contributor

ekump commented Jul 14, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 22.10 MB 22.10 MB -0% (-168 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 9.24 MB 9.24 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 70.24 MB 70.24 MB -0% (-200 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.09 MB 9.09 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 82.45 MB 82.45 MB -0% (-216 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 26.16 MB 26.16 MB -0% (-168 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 18.37 MB 18.37 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 65.03 KB 65.03 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 124.80 MB 124.79 MB --.01% (-16.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 644.70 MB 644.70 MB -0% (-400 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 5.87 MB 5.87 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 65.03 KB 65.03 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 17.33 MB 17.33 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 32.14 MB 32.14 MB +0% (+232 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 15.66 MB 15.66 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 66.03 KB 66.03 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 127.13 MB 127.14 MB +0% (+8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 634.33 MB 634.33 MB -0% (-722 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 4.48 MB 4.48 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 66.03 KB 66.03 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 18.47 MB 18.47 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 30.18 MB 30.19 MB +0% (+224 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 62.96 MB 62.96 MB +0% (+232 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.83 MB 9.83 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 20.95 MB 20.95 MB +0% (+40 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 77.43 MB 77.43 MB +0% (+232 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.74 MB 9.74 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 24.09 MB 24.09 MB +0% (+40 B) 👌

@bwoebi
Copy link
Contributor

bwoebi commented Jul 14, 2025

To be honest, I don't like this. The C code should ensure no stray NULLs are flying around when they should not.
This PR feels like we're mitigating broken error handling.

@hoolioh
Copy link
Contributor Author

hoolioh commented Jul 14, 2025

To be honest, I don't like this. The C code should ensure no stray NULLs are flying around when they should not. This PR feels like we're mitigating broken error handling.

The response is placed in a pointer passed by reference to ddog_trace_exporter_send. That function can fail so there could be situations in which the agent's response is not placed there because there is no response. However even that didn't happen there is the possibility that the user would pass a null pointer to our API by mistake and I think it's a good practice not to segfault even when it's not our responsibility.
Moreover we're also checking for nullability in other places of the FFI layer due to null-ptr optimization , e.g.:

pub unsafe extern "C" fn ddog_trace_exporter_config_set_url(
    config: Option<&mut TraceExporterConfig>,
    url: CharSlice,
) -> Option<Box<ExporterError>> {
    catch_panic!(
        if let Some(handle) = config {
            handle.url = match sanitize_string(url) {
                Ok(s) => Some(s),
                Err(e) => return Some(e),
            };
            None
        } else {
            gen_error!(ErrorCode::InvalidArgument)
        },
        gen_error!(ErrorCode::Panic)
    )
}

@hoolioh
Copy link
Contributor Author

hoolioh commented Jul 14, 2025

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Jul 14, 2025

View all feedbacks in Devflow UI.

2025-07-14 13:11:23 UTC ℹ️ Start processing command /merge


2025-07-14 13:11:29 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-07-14 17:12:09 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

@ekump
Copy link
Contributor

ekump commented Jul 14, 2025

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Jul 14, 2025

View all feedbacks in Devflow UI.

2025-07-14 17:37:50 UTC ℹ️ Start processing command /merge


2025-07-14 17:38:03 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-07-14 21:38:05 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time

@hoolioh hoolioh force-pushed the julio/handle-null-pointer-on-exporter-response branch from 16dcefe to 2713e82 Compare July 16, 2025 06:59
@hoolioh
Copy link
Contributor Author

hoolioh commented Jul 16, 2025

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Jul 16, 2025

View all feedbacks in Devflow UI.

2025-07-16 09:17:53 UTC ℹ️ Start processing command /merge


2025-07-16 09:17:59 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 41m (p90).


2025-07-16 10:00:41 UTCMergeQueue: The checks failed on this merge request

Tests failed on this commit cf43f5b:

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.

@hoolioh
Copy link
Contributor Author

hoolioh commented Jul 16, 2025

/remove

@dd-devflow-routing-codex
Copy link

View all feedbacks in Devflow UI.

2025-07-16 10:09:50 UTC ℹ️ Start processing command /remove
If you need support, contact us on Slack #devflow!


2025-07-16 10:09:52 UTCDevflow: /remove

This merge request was already processed and can't be unqueued anymore.

To get help about command usage, write /remove --help

If you need support, contact us on Slack #devflow with those details!

@hoolioh
Copy link
Contributor Author

hoolioh commented Jul 16, 2025

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Jul 16, 2025

View all feedbacks in Devflow UI.

2025-07-16 10:10:08 UTC ℹ️ Start processing command /merge


2025-07-16 10:10:13 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 41m (p90).


2025-07-16 10:46:01 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 034bb32 into main Jul 16, 2025
37 checks passed
@dd-mergequeue dd-mergequeue bot deleted the julio/handle-null-pointer-on-exporter-response branch July 16, 2025 10:45
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