Skip to content

fix: validate list-view size buffers - #1003

Merged
paleolimbot merged 3 commits into
apache:mainfrom
efegokdemir:efe/list-view-size-validation
Nov 9, 2026
Merged

paleolimbot merged 3 commits into
apache:mainfrom
efegokdemir:efe/list-view-size-validation

Conversation

@efegokdemir

@efegokdemir efegokdemir commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Minimal validation only checks the first two buffers, so it misses the sizes buffer in ListView and LargeListView arrays. Include that fixed-size third buffer to reject missing or truncated sizes before full validation reads them, and infer its size when unknown. Regression tests cover both types, sliced arrays, and empty arrays. R array-print snapshots also normalise version-dependent separator spacing from str().

Debug and ASan/UBSan CTest builds each passed 298 tests, with 3 thread-safety tests skipped by the build configuration. The sanitizer run used ASAN_OPTIONS=allocator_may_return_null=1:detect_leaks=0 for tests that deliberately request oversized allocations. clang-format 16.0.6, codespell 2.2.5 and git diff --check passed. The R-devel check passed on GitHub with 1,762 expectations and no failures or warnings.

Codex generated the fix and regression tests and ran the local checks.

@codecov-commenter

codecov-commenter commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.48%. Comparing base (d643716) to head (7b99a8c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1003   +/-   ##
=======================================
  Coverage   78.48%   78.48%           
=======================================
  Files         106      106           
  Lines       17244    17245    +1     
  Branches     2065     2065           
=======================================
+ Hits        13534    13535    +1     
  Misses       2446     2446           
  Partials     1264     1264           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paleolimbot paleolimbot 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.

Thank you!

If you don't mind reverting the R fix, I believe we have that solved on main now.

Comment thread r/tests/testthat/test-array.R Outdated
Comment on lines +41 to +44
# str() spacing differs between R versions.
normalize_str_output <- function(x) {
gsub(": (List of|<nanoarrow_buffer)", ":\\1", x)
}

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.

I fixed this one in a separate PR...I think you can revert this!

Keep the ListView size-buffer fix and regression tests while preserving
upstream overflow, unaligned-access, and IPC changes. Use the R printing
fix and snapshots from apache#1007 instead of the PR-specific test transform.

Generated-by: Codex

@paleolimbot paleolimbot 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.

Thank you!

@paleolimbot
paleolimbot merged commit f7eb0c1 into apache:main Nov 9, 2026
44 checks passed
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.

3 participants