Skip to content

Dataset string memcap 3910/v8#11177

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

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

Conversation

@inashivb
Copy link
Member

@inashivb inashivb commented May 29, 2024

Link to redmine ticket: https://redmine.openinfosecfoundation.org/issues/3910

Previous PR: #11162

Changes since v7:

  • only do atomic ops if necessary
  • one error handling path covered
  • use latest d4eb7e0

victorjulien and others added 5 commits May 29, 2024 18:32
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
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 20842

@inashivb inashivb closed this Jun 5, 2024
@inashivb inashivb deleted the dataset-string-memcap-3910/v8 branch June 5, 2024 12:26
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