Skip to content

Allow passing nullptr when creating 0-sized string objects#476

Merged
Anilm3 merged 2 commits into
masterfrom
anilm3/allow-nullptr-empty-string-on-set
Nov 4, 2025
Merged

Allow passing nullptr when creating 0-sized string objects#476
Anilm3 merged 2 commits into
masterfrom
anilm3/allow-nullptr-empty-string-on-set

Conversation

@Anilm3

@Anilm3 Anilm3 commented Nov 4, 2025

Copy link
Copy Markdown
Collaborator

Allow passing nullptr to ddwaf_object_set_string when the provided length is 0, in order to create an empty string.

Note that this results in a small_string of length 0.

@Anilm3
Anilm3 requested a review from a team as a code owner November 4, 2025 12:13
@Anilm3
Anilm3 temporarily deployed to dd-protected-coverage November 4, 2025 12:22 — with GitHub Actions Inactive
@codecov-commenter

codecov-commenter commented Nov 4, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.21%. Comparing base (87e7779) to head (133fe68).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
src/interface.cpp 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #476      +/-   ##
==========================================
+ Coverage   85.19%   85.21%   +0.02%     
==========================================
  Files         189      189              
  Lines        9225     9226       +1     
  Branches     4178     4179       +1     
==========================================
+ Hits         7859     7862       +3     
+ Misses        531      528       -3     
- Partials      835      836       +1     
Flag Coverage Δ
waf_test 85.21% <66.66%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datadog-official

datadog-official Bot commented Nov 4, 2025

Copy link
Copy Markdown

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 93.98% (+0.03%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 133fe68 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@github-actions

github-actions Bot commented Nov 4, 2025

Copy link
Copy Markdown

Artifact Size Comparison 📦

Artifact Previous Release This PR Difference
darwin-arm64::libddwaf.a 90006808 93339992 0.03%
darwin-arm64::libddwaf.a.stripped 4579664 4920728 0.07%
darwin-arm64::libddwaf.dylib 1963024 2048736 0.04%
darwin-universal::libddwaf.a 181421048 188350408 0.03%
darwin-universal::libddwaf.a.stripped 9765560 10493032 0.07%
darwin-universal::libddwaf.dylib 4142096 4309728 0.04%
darwin-x86_64::libddwaf.a 91414192 95010368 0.03%
darwin-x86_64::libddwaf.a.stripped 5185848 5572256 0.07%
darwin-x86_64::libddwaf.dylib 2150896 2237824 0.04%
linux-aarch64::libddwaf.a 73159398 76100986 0.04%
linux-aarch64::libddwaf.a.stripped 11852314 12387662 0.04%
linux-aarch64::libddwaf.so 2463264 2513992 0.02%
linux-armv7::libddwaf.a 64719602 67256604 0.03%
linux-armv7::libddwaf.a.stripped 10852830 11374520 0.04%
linux-armv7::libddwaf.so 2148796 2171660 0.01%
linux-i386::libddwaf.a 62843294 65325436 0.03%
linux-i386::libddwaf.a.stripped 9380114 9834380 0.04%
linux-i386::libddwaf.so 2392820 2435936 0.01%
linux-x86_64::libddwaf.a 73646022 76603456 0.04%
linux-x86_64::libddwaf.a.stripped 11671354 12181716 0.04%
linux-x86_64::libddwaf.so 2660096 2711728 0.01%
windows-arm64::ddwaf.dll 4788736 4941312 0.03%
windows-arm64::ddwaf.lib 11698 16410 0.40%
windows-arm64::ddwaf_static.lib 57913956 60476696 0.04%
windows-win32::ddwaf.dll 3368448 3478528 0.03%
windows-win32::ddwaf.lib 11922 16726 0.40%
windows-win32::ddwaf_static.lib 49534552 51794126 0.04%
windows-x64::ddwaf.dll 4101632 4207616 0.02%
windows-x64::ddwaf.lib 11698 16410 0.40%
windows-x64::ddwaf_static.lib 57410292 59911128 0.04%

@pr-commenter

pr-commenter Bot commented Nov 4, 2025

Copy link
Copy Markdown

Benchmarks clang-pgo

Benchmark execution time: 2025-11-04 12:50:16

Comparing candidate commit 4b3b21e in PR branch anilm3/allow-nullptr-empty-string-on-set with baseline commit f6d1998 in branch master.

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

@Anilm3
Anilm3 enabled auto-merge (squash) November 4, 2025 13:23
@Anilm3
Anilm3 temporarily deployed to dd-protected-coverage November 4, 2025 13:32 — with GitHub Actions Inactive
@Anilm3
Anilm3 merged commit 9a789f8 into master Nov 4, 2025
53 of 54 checks passed
@Anilm3
Anilm3 deleted the anilm3/allow-nullptr-empty-string-on-set branch November 4, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants