Skip to content

Dataset string memcap 3910/v9#11180

Closed
inashivb wants to merge 5 commits intoOISF:masterfrom
inashivb:dataset-string-memcap-3910/v9
Closed

Dataset string memcap 3910/v9#11180
inashivb wants to merge 5 commits intoOISF:masterfrom
inashivb:dataset-string-memcap-3910/v9

Conversation

@inashivb
Copy link
Member

@inashivb inashivb commented May 30, 2024

just a show of approach w extra comments and known Notice stmts. NOT to be considered for merge.

Previous PR: #11177

victorjulien and others added 4 commits May 30, 2024 13:10
Add a callback and helper function to handle data expiration.

Update datasets to explicitly not use expiration.
In order to have access to the length of datatypes with variable lengths
to correctly update memuse to calculate memcaps.

Bug 3910
So far, when the data size was passed to the THash API, it was sent as
a sizeof(Struct) which works fine for the other data types as they have
a fixed length but not for the StringType.
However, because of the sizeof construct, the length of a string type
dataset was always taken to be 16 Bytes which is only the size of the struct
itself. It did not accomodate the actual size of the string that the
StringType holds. Fix this so that the memuse that is used to determine
whether memcap was reached also takes into consideration the size of the
actual string.

Bug 3910
@codecov
Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 44.94382% with 49 lines in your changes are missing coverage. Please review.

Project coverage is 78.02%. Comparing base (daa6f6f) to head (e2b2b95).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11180      +/-   ##
==========================================
- Coverage   82.93%   78.02%   -4.91%     
==========================================
  Files         942      942              
  Lines      250797   250882      +85     
==========================================
- Hits       207994   195749   -12245     
- Misses      42803    55133   +12330     
Flag Coverage Δ
fuzzcorpus ?
livemode 18.78% <26.96%> (-0.01%) ⬇️
pcap 44.52% <23.59%> (-0.11%) ⬇️
suricata-verify 61.64% <44.94%> (+0.20%) ⬆️
unittests 60.64% <0.00%> (-0.03%) ⬇️

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

@inashivb inashivb force-pushed the dataset-string-memcap-3910/v9 branch from 7574bd4 to e2b2b95 Compare May 30, 2024 10:56
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 20890

@inashivb inashivb closed this Jun 5, 2024
@inashivb inashivb deleted the dataset-string-memcap-3910/v9 branch June 5, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants