Skip to content

fix: close remaining FFI panic boundary gaps - #65

Merged
jja725 merged 2 commits into
lance-format:mainfrom
u70b3:fix/panic-ffi-followup
Aug 27, 2026
Merged

fix: close remaining FFI panic boundary gaps#65
jja725 merged 2 commits into
lance-format:mainfrom
u70b3:fix/panic-ffi-followup

Conversation

@u70b3

@u70b3 u70b3 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #62 and #61. This addresses the remaining lance_dataset_take / take_rows review note and the additional FFI boundary gaps found in a full post-merge audit.

Summary

  • keep ordinary error formatting, TLS updates, and ABI sentinel construction inside the panic firewall; reject panic=abort builds
  • guard materialized take / take_rows Arrow readers, preflight schemas, sanitize deferred errors, and contain release-time panics
  • make scanner poisoning and output initialization consistent across setters and iteration APIs
  • reject NULL async callbacks and poll wakers, make cloned RawWakers one-shot, and preserve exactly-once async completion when dispatcher startup or delivery fails
  • add an explicit free API for library-allocated async Arrow stream containers and document C/C++ ownership
  • guard index-segment metadata accessors and cleanup, and make C++ zero-sentinel wrappers check TLS immediately

Validation

  • cargo fmt --check
  • cargo check --all-targets --offline
  • cargo clippy --all-targets --offline -- -D warnings
  • cargo test --offline (346 tests passed)
  • cargo test --test compile_and_run_test --offline -- --ignored (C and C++)
  • cargo rustdoc --lib --offline -- -D warnings
  • cargo check --release --all-targets --offline
  • cargo rustc --lib --offline -- -C panic=abort (expected compile-time rejection)

No dependency or Cargo.lock changes.

@u70b3
u70b3 marked this pull request as ready for review August 26, 2026 13:32
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 26, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 27, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gate recommendation: approve.

The panic-containment change remains well-grounded, and the previous poll-waker lifetime blocker is fixed. Scanner close now cancels pending registrations and waits for active callbacks before freeing the scanner, with registration serialized against retirement. The public lifetime/no-reentry contract and focused regressions cover retained-waker cancellation and active-callback quiescence.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 27, 2026
@jja725
jja725 merged commit 98fc6dd into lance-format:main Aug 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants