Skip to content

Chunk vcache_mset to avoid bit64 as.list protection overflow#240

Open
jefferis wants to merge 2 commits into
masterfrom
fix/vcache_int64
Open

Chunk vcache_mset to avoid bit64 as.list protection overflow#240
jefferis wants to merge 2 commits into
masterfrom
fix/vcache_int64

Conversation

@jefferis

Copy link
Copy Markdown
Collaborator

bit64::as.list.integer64() PROTECTs once per element in a C loop (r-lib/bit64#346), overflowing R's protection stack for integer64 vectors longer than ~R_PPStackSize. This surfaced as a protection stack overflow when flywire_updateids() cached a large batch of supervoxel->root id mappings.

vcache_mset() now converts via as_list_chunked(), which splits into 10k blocks so each as.list() stays under the limit regardless of the installed bit64 version.

bit64::as.list.integer64() PROTECTs once per element in a C loop
(r-lib/bit64#346), overflowing R's protection stack for integer64
vectors longer than ~R_PPStackSize. This surfaced as a protection
stack overflow when flywire_updateids() cached a large batch of
supervoxel->root id mappings.

vcache_mset() now converts via as_list_chunked(), which splits into
10k blocks so each as.list() stays under the limit regardless of the
installed bit64 version.
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.76%. Comparing base (783e071) to head (1ca00f4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
+ Coverage   58.73%   58.76%   +0.03%     
==========================================
  Files          44       44              
  Lines        5901     5913      +12     
==========================================
+ Hits         3466     3475       +9     
- Misses       2435     2438       +3     

☔ 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.

Fixes R CMD check WARNING: undocumented argument 'invert_surf' in
flywire_partners.Rd.
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