Skip to content

Fix unsigned params for babeltrace_thapi (display_name_max_size, offset)#500

Merged
TApplencourt merged 1 commit into
develfrom
fix-unsigned-params
May 11, 2026
Merged

Fix unsigned params for babeltrace_thapi (display_name_max_size, offset)#500
TApplencourt merged 1 commit into
develfrom
fix-unsigned-params

Conversation

@TApplencourt
Copy link
Copy Markdown
Collaborator

The previous workaround wrapped values as "+#{int}" strings, intending to mark them as babeltrace2 unsigned. But the Ruby BT2.from_value routes String to BTValueString, so the C side called bt_value_integer_unsigned_get on a string handle and got garbage. Pass bare Integers instead — from_value already routes >2**63-1 to BTValueIntegerUnsigned automatically.

Adds two regression tests in integration_tests/general.bats:

  • max-name-size: truncation marker appears at small size, absent at -1
  • timeline_output-offset_deterministic: two replays must produce identical files

Also adds run -0 to stderr_output and read_stdin which were using bare run but assumed exit 0.

Will fix #498

@TApplencourt TApplencourt force-pushed the fix-unsigned-params branch from 3b307ac to 1b65001 Compare May 11, 2026 22:15
The previous workaround wrapped values as "+#{int}" strings, intending to
mark them as babeltrace2 unsigned. But the Ruby BT2.from_value routes
String to BTValueString, so the C side called bt_value_integer_unsigned_get
on a string handle and got garbage. Pass bare Integers instead — from_value
already routes >2**63-1 to BTValueIntegerUnsigned automatically.

Adds two regression tests in integration_tests/general.bats:
- max-name-size: truncation marker appears at small size, absent at -1
- timeline_output-offset_deterministic: two replays must produce identical files

Also adds run -0 to stderr_output and read_stdin which were using bare run
but assumed exit 0.

Will fix #498
@TApplencourt TApplencourt force-pushed the fix-unsigned-params branch from 1b65001 to 0ce3525 Compare May 11, 2026 22:26
@TApplencourt TApplencourt merged commit f315201 into devel May 11, 2026
27 checks passed
@TApplencourt TApplencourt deleted the fix-unsigned-params branch May 11, 2026 22:37
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.

--max-line not respected anymore

1 participant