tally: make display_name_max_size a signed integer - #542
Merged
Merged
Conversation
The file predates the yamlfmt lint job and never got formatted, so its list
items are indented under `:entries:` while .yamlfmt sets
`indentless_arrays: true`. CI only lints CHANGED yaml files, so this went
unnoticed until a one-line edit to this file made the whole file eligible.
Pure reformatting, separated from the type change in the next commit so that
change is readable. Parsed YAML is unchanged, and the generated
btx_component.{c,h} are byte-identical.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
btx_tally.cpp reads display_name_max_size into `const int max_name_size`, and
`--max-name-size -1` is a documented value ("Use -1 for no limit", handled by
`if (u_size < 0) return original` in limit_string_size). The metababel param
metadata declared it integer_unsigned, so the trace metadata contradicted its
own C consumer. Declare it signed.
Nothing changes today. babeltrace2-ruby encodes integers as signed, and
integer_unsigned is the one param type metababel generates no validation for:
the bare bt_value_integer_unsigned_get read the signed -1 back as UINT64_MAX,
which wrapped to -1 again in the C `const int`. It worked by two's-complement
luck. Declaring it signed generates bt_value_is_signed_integer +
bt_value_integer_signed_get and an int64_t field, which is what the consumer
wanted all along -- and that guard passes precisely because the value on the
wire was always signed.
Verified against a stock metababel 1.1.4 build, with the devel build as
reference: `--max-name-size 10` truncates identically (16 `[...]` markers) and
`--max-name-size -1` prints full names with no "Bad value" error, on both.
The 19 tally rows are identical sets, and `general.bats max-name-size` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TApplencourt
force-pushed
the
tally-signed-v2
branch
from
September 18, 2026 16:18
22f29ed to
c632753
Compare
This file contains hidden or 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
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.
btx_tally.cpp reads display_name_max_size into
const int max_name_size, and--max-name-size -1is used for no limit.Oupsy