-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
winevtlog: change total_size_threshold to size_t #8853
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `total_size_threshold` field was originally an unsigned int. The field in the config map uses `FLB_CONFIG_MAP_SIZE`, which reads the value as a `size_t` and then writes it to the offset of the field in the struct. On a 64-bit machine, this is 8 bytes. This means the 8 byte value would be written at this offset, as a result overriding the value of the next struct field. This would cause `string_inserts` with default values to end up being `false` when it should be `true`. This PR changes `total_size_threshold` to a `size_t`. This seems consistent with other usages of `FLB_CONFIG_MAP_SIZE` that I was able to find. Signed-off-by: braydonk <braydonk@google.com>
macos jemalloc unit tests is the usual flake. |
9 tasks
cosmo0920
approved these changes
May 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, got it. Thanks for the detailed explanations.
To be honest, I didn't recognize this issue because I'm always specifying as string_inserts true
...
markuman
pushed a commit
to markuman/fluent-bit
that referenced
this pull request
May 29, 2024
The `total_size_threshold` field was originally an unsigned int. The field in the config map uses `FLB_CONFIG_MAP_SIZE`, which reads the value as a `size_t` and then writes it to the offset of the field in the struct. On a 64-bit machine, this is 8 bytes. This means the 8 byte value would be written at this offset, as a result overriding the value of the next struct field. This would cause `string_inserts` with default values to end up being `false` when it should be `true`. This PR changes `total_size_threshold` to a `size_t`. This seems consistent with other usages of `FLB_CONFIG_MAP_SIZE` that I was able to find. Signed-off-by: braydonk <braydonk@google.com> Signed-off-by: Markus Bergholz <git@osuv.de>
erikbledsoe
added a commit
to erikbledsoe/fluent-bit
that referenced
this pull request
Jul 11, 2024
Adds the logos of TisaLabs and Kakao as requested in [issue fluent#8836](fluent#8836) and [issue fluent#8853](fluent#8653) Signed-off-by: Erik Bledsoe <erik.bledsoe@chronosphere.io>
edsiper
pushed a commit
that referenced
this pull request
Jul 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
total_size_threshold
field was originally an unsigned int. The field in the config map usesFLB_CONFIG_MAP_SIZE
, which reads the value as asize_t
and then writes it to the offset of the field in the struct. On a 64-bit machine, this is 8 bytes. This means the 8 byte value would be written at this offset, as a result overriding the value of the next struct field. This would causestring_inserts
with default values to end up beingfalse
when it should betrue
.This PR changes
total_size_threshold
to asize_t
. This seems consistent with other usages ofFLB_CONFIG_MAP_SIZE
that I was able to find.#8854
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.