Skip to content

test(rust/driver_manager): build the fake statement's private data with ptr::dangling_mut - #8

Merged
krinart merged 1 commit into
spiceai-24-patchesfrom
viktor/df55-att2/spiceai-24-patches
Oct 1, 2026
Merged

krinart merged 1 commit into
spiceai-24-patchesfrom
viktor/df55-att2/spiceai-24-patches

Conversation

@krinart

@krinart krinart commented Oct 1, 2026

Copy link
Copy Markdown

Fixes the Rust workflow failure on #7: clippy::manual_dangling_ptr (stable 1.98) rejects the 1 as *mut c_void sentinel the statement_cancel test's fake driver stores in private_data. std::ptr::dangling_mut::<c_void>() is the same non-null, never-dereferenced marker.

Evidence:

  • CI before (Rust ubuntu-latest, job 109758167384): error: manual creation of a dangling pointer --> driver_manager/tests/statement_cancel.rs:110:42 ... error: could not compile adbc_driver_manager (test "statement_cancel"). The same error is on the spiceai-maint-24-patches line (Spice patches on ADBC 24 #5, job 107892394233), so the patch carried it over; it is not an ADBC 24 regression.
  • Local, before: RUSTFLAGS=-Adead_code cargo +1.98.1 clippy --workspace --all-targets --all-features --locked -- -Dwarnings (the CI step) -> same error at statement_cancel.rs:110:42.
  • Local, after: same command -> Finished, no warnings; the nightly-2026-07-21 clippy step from ci/rust-nightly is also clean; cargo test -p adbc_driver_manager --test statement_cancel --all-features -> ok. 2 passed.

…th ptr::dangling_mut

clippy::manual_dangling_ptr (stable 1.98) rejects `1 as *mut c_void`, failing the
Rust workflow's clippy step on every OS.
Copilot AI balanced review requested due to automatic review settings October 1, 2026 04:44

Copilot AI 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.

Copilot review overview

🟢 Approved

The focused change preserves existing semantics and resolves the reported Clippy failure.

Review effort: Balanced
Findings: None

What changed in this PR

Updates the fake Rust driver’s statement sentinel to satisfy newer Clippy checks without changing behavior.

Changes:

  • Replaces a manually constructed dangling pointer with std::ptr::dangling_mut.
  • Preserves the non-null, never-dereferenced allocation marker.
File Description
rust/​driver_manager/​tests/​statement_cancel.rs Modernizes fake statement private-data initialization.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@krinart
krinart merged commit 674d618 into spiceai-24-patches Oct 1, 2026
11 of 21 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.

2 participants