Skip to content

[ABA-29] fix(vortex-runend): release-build sortedness validation in RunEnd::try_new#2

Open
abnobdoss wants to merge 2 commits into
developfrom
fix/c18-runend-sortedness
Open

[ABA-29] fix(vortex-runend): release-build sortedness validation in RunEnd::try_new#2
abnobdoss wants to merge 2 commits into
developfrom
fix/c18-runend-sortedness

Conversation

@abnobdoss
Copy link
Copy Markdown
Owner

Summary

Demonstrates and fixes ABA-29: RunEnd::try_new sortedness validation is gated by #[cfg(debug_assertions)], so release builds accept malformed RunEnd arrays. Downstream compute paths later crash or silently return wrong data.

  • Repro: encodings/runend/tests/issue_aba29_sortedness_release_check.rs (fails without the fix).
  • Fix: promote the sortedness check out of #[cfg(debug_assertions)].

Linear

https://linear.app/abanoubdoss/issue/ABA-29

Validation

  • cargo test -p vortex-runend passes (new repro test + existing tests).
  • cargo clippy -p vortex-runend --all-targets clean.
  • cargo +nightly fmt --all -- --check clean.
  • Validated against vortex 0.72.0 in vortex-bug-hunt-72/tests/c18_runend_sortedness_debug_only.rs.

🤖 Generated with Claude Code

Abanoub Doss and others added 2 commits May 21, 2026 07:44
…s validation is debug-only

Demonstrates that RunEnd::try_new accepts unsorted ends arrays in release
builds because the sortedness check is gated by #[cfg(debug_assertions)].

Linear: https://linear.app/abanoubdoss/issue/ABA-29

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Abanoub Doss <abanoub.doss@gmail.com>
…ebug_assertions

Move the sortedness validation in RunEnd::try_new from #[cfg(debug_assertions)]
to always run, so release builds reject malformed RunEnd arrays at construction.

Linear: https://linear.app/abanoubdoss/issue/ABA-29

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Abanoub Doss <abanoub.doss@gmail.com>
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.

1 participant