Skip to content

[v2] Remove object limits and defer truncation to the caller#382

Merged
Anilm3 merged 5 commits into
anilm3/writable_objectsfrom
anilm3/remove-object-limits
Mar 20, 2025
Merged

[v2] Remove object limits and defer truncation to the caller#382
Anilm3 merged 5 commits into
anilm3/writable_objectsfrom
anilm3/remove-object-limits

Conversation

@Anilm3

@Anilm3 Anilm3 commented Mar 17, 2025

Copy link
Copy Markdown
Collaborator

This PR removes the notion of object limits and defers the truncation of inputs to the caller. This ensures that limits can be applied selectively (or not at all) without the need for further configuration.

@codecov-commenter

codecov-commenter commented Mar 17, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.28302% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.90%. Comparing base (c6d9fbf) to head (2207864).

Files with missing lines Patch % Lines
src/configuration/common/expression_parser.cpp 0.00% 0 Missing and 1 partial ⚠️
src/configuration/rule_parser.cpp 0.00% 0 Missing and 1 partial ⚠️
src/interface.cpp 50.00% 0 Missing and 1 partial ⚠️
src/processor/base.hpp 0.00% 0 Missing and 1 partial ⚠️
src/rule.hpp 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                     Coverage Diff                     @@
##           anilm3/writable_objects     #382      +/-   ##
===========================================================
+ Coverage                    84.74%   84.90%   +0.15%     
===========================================================
  Files                          166      166              
  Lines                         8477     8427      -50     
  Branches                      3621     3595      -26     
===========================================================
- Hits                          7184     7155      -29     
+ Misses                         499      495       -4     
+ Partials                       794      777      -17     
Flag Coverage Δ
waf_test 84.90% <95.28%> (+0.15%) ⬆️

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.

@pr-commenter

pr-commenter Bot commented Mar 17, 2025

Copy link
Copy Markdown

Benchmarks clang

Benchmark execution time: 2025-03-19 11:49:00

Comparing candidate commit 2207864 in PR branch anilm3/remove-object-limits with baseline commit c6d9fbf in branch anilm3/writable_objects.

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

scenario:global-benchmark.random.clang

  • 🟥 execution_time [+17.685ms; +17.727ms] or [+7.422%; +7.439%]

@pr-commenter

pr-commenter Bot commented Mar 17, 2025

Copy link
Copy Markdown

Benchmarks gcc

Benchmark execution time: 2025-03-19 11:51:49

Comparing candidate commit 2207864 in PR branch anilm3/remove-object-limits with baseline commit c6d9fbf in branch anilm3/writable_objects.

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

scenario:global-benchmark.random.gcc

  • 🟩 execution_time [-11.038ms; -11.001ms] or [-3.878%; -3.865%]

@pr-commenter

pr-commenter Bot commented Mar 19, 2025

Copy link
Copy Markdown

Benchmarks clang-pgo

Benchmark execution time: 2025-03-19 12:05:23

Comparing candidate commit 2207864 in PR branch anilm3/remove-object-limits with baseline commit c6d9fbf in branch anilm3/writable_objects.

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

@Anilm3
Anilm3 marked this pull request as ready for review March 19, 2025 12:18
@Anilm3
Anilm3 requested a review from a team as a code owner March 19, 2025 12:18
Comment thread benchmark/main.cpp
Comment thread src/utils.hpp
@Anilm3
Anilm3 merged commit f9a7548 into anilm3/writable_objects Mar 20, 2025
@Anilm3
Anilm3 deleted the anilm3/remove-object-limits branch March 20, 2025 16:38
Anilm3 added a commit that referenced this pull request Mar 20, 2025
…#378, #382)

- Writable objects: owned and borrowed object (#378)
- Remove object limits and defer truncation to the caller (#382)
Anilm3 added a commit that referenced this pull request Oct 1, 2025
* Object view: read only abstraction to ddwaf_object (#341)
* [v2] Remove mingw builds (#381)
* Writable objects: owned and borrowed object and object limits removal (#378, #382)
* [v2] Refactor and improve object types (#387)
* [v2] Update unit tests to use new abstractions (#389)
* [v2] Update `raw_configuration` type to use `object_view` (#390)
* [v2] Remove remaining uses of ddwaf_object in `src` and `tests/unit` (#391)
* [v2] JWT Decoding Processor (#401)
* [v2] First iteration of object layout changes (#394)
* Split context data insertion from evaluation (#407)
* [v2] Second iteration of object layout changes (#408)
* [v2] Add new fingerprint and object view tests (#414)
* Reenable attribute collector unit test (#415)
* [v2] Container view types (#413)
* Exclude assertions from coverage (#416)
* [v2] Use allocators internally instead of malloc/free and stop generating zero-terminated strings (#418)
* Add memory resource to owned and borrowed objects (#428)
* [v2] Propagate allocators from context (#420)
* [v2] Update interface and expose allocators (#427)
* Refactor evaluation stages out of the context (#442)
* Subcontext: replace ephemerals with a new scope with user-defined lifetime derived from the context (#443)
* Validator: Add support for testing subcontexts and attributes (#451)
* [v2] Pass allocator to context and subcontext eval and add new allocators (#452)
* Update logger to avoid dependencies on ddwaf.h (#453)
* [v2] Return DDWAF_MATCH when there are events, attributes or actions (#455)
* [v2] Cleanup: remove exclusion namespace and some redundant references (#456)
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