Skip to content

Address truncation in interactive histogram X-axis ruler#6562

Draft
andersendsa wants to merge 2 commits into
rizinorg:devfrom
andersendsa:histogram_overflow
Draft

Address truncation in interactive histogram X-axis ruler#6562
andersendsa wants to merge 2 commits into
rizinorg:devfrom
andersendsa:histogram_overflow

Conversation

@andersendsa

Copy link
Copy Markdown

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description
The interactive horizontal histogram (p==) truncated the rightmost address offset on the X-axis ruler to a single character (e.g. 0 instead of 0x...) because max_room for the last label tick was constrained to data_cols - start_col.

This commit replaces the max_room calculation for the last tick so that it does not aggressively truncate the label, allowing the full address to be displayed correctly.

...

Test plan

  1. Build the project using ninja -C build.
  2. Run rizin and view interactive histogram using p== <size>.
  3. Notice that the last address on the x-axis ruler (bottom right) is no longer truncated and displays the full address representation (e.g. 0x1000 instead of 0).
  4. Ensure the regression tests for histogram pass via ninja -C build test or specifically cd test && rz-test db/cmd/cmd_print.

...

Closing issues
Closes:. #6550

...

The interactive horizontal histogram (`p==`) truncated the rightmost
address offset on the X-axis ruler to a single character (e.g. `0`
instead of `0x...`) because `max_room` for the last label tick
was constrained to `data_cols - start_col`.

This commit replaces the `max_room` calculation for the last tick
so that it does not aggressively truncate the label, allowing the
full address to be displayed correctly.
@andersendsa andersendsa changed the title Fix address truncation in interactive histogram X-axis ruler Address truncation in interactive histogram X-axis ruler Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.90%. Comparing base (c351d5f) to head (e50f02f).
⚠️ Report is 16 commits behind head on dev.

Additional details and impacted files
Files with missing lines Coverage Δ
librz/cons/histogram.c 69.59% <100.00%> (-0.36%) ⬇️

... and 40 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c351d5f...e50f02f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Rot127 Rot127 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add before and after screenshots please.

@andersendsa

Copy link
Copy Markdown
Author

Add before and after screenshots please.

@Rot127
Before
image

After

image

@andersendsa
andersendsa requested a review from Rot127 June 27, 2026 04:34
@Rot127 Rot127 added the Requirements not met The PR doesn't meet the minimum contribution requirements. See CONTRIBUTING.md for details. label Jun 27, 2026
@Rot127
Rot127 marked this pull request as draft June 27, 2026 11:05
@andersendsa

Copy link
Copy Markdown
Author

Hi @Rot127 could you pls review the the pr and help me identify the changes that are needed ?

@wargio

wargio commented Jun 27, 2026

Copy link
Copy Markdown
Member

Add before and after screenshots please.

@Rot127 Before image

After
image

i'm sorry. these images are identical.

@notxvilka

Copy link
Copy Markdown
Contributor

That's definitely not an actual screenshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Requirements not met The PR doesn't meet the minimum contribution requirements. See CONTRIBUTING.md for details. RzCons

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants