Skip to content

Harden DuckDB-owned string handling at FFI boundaries#750

Merged
mlafeldt merged 4 commits intomainfrom
raii-strings
Apr 30, 2026
Merged

Harden DuckDB-owned string handling at FFI boundaries#750
mlafeldt merged 4 commits intomainfrom
raii-strings

Conversation

@mlafeldt
Copy link
Copy Markdown
Member

@mlafeldt mlafeldt commented Apr 30, 2026

Replaces manual or incorrect ownership handling for DuckDB-allocated C strings with DuckDbString, ensuring duckdb_free is used consistently and runs on drop.

Also adds null checks before wrapping DuckDB string pointers, tightens DuckDbString ownership/safety docs, and removes unchecked table-function name construction.

@mlafeldt mlafeldt self-assigned this Apr 30, 2026
@mlafeldt mlafeldt changed the title Use RAII for DuckDB-owned strings Harden DuckDB-owned string handling at FFI boundaries Apr 30, 2026
@mlafeldt mlafeldt merged commit 64d6108 into main Apr 30, 2026
7 checks passed
@mlafeldt mlafeldt deleted the raii-strings branch April 30, 2026 09:46
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