Skip to content

Conversation

rustyconover
Copy link
Contributor

Hi DuckDB Team,

I discovered an issue where the validity mask wasn't being properly checked when using the ArrowBool8 Arrow extension type. This causes a runtime error in debug mode.

The following undefined behavior error occurs in debug builds:

/Users/rusty/Development/airport/duckdb/src/common/arrow/arrow_type_extension.cpp:361:40: runtime error: load of value 190, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/rusty/Development/airport/duckdb/src/common/arrow/arrow_type_extension.cpp:361:40 

Reproduction Steps:

This can be reproduced during Airport extension testing with the following SQL:

use test1.test_schema;
set arrow_lossless_conversion = true;
CREATE TABLE switches (
    status boolean
);
insert into switches values (false), (true), (false), (true), (null);

The issue stems from not validating the Arrow validity mask before loading values in the result vector. This PR adds the missing check. Please merge this back to main as well.

@Mytherin Mytherin merged commit 78092e2 into duckdb:v1.3-ossivalis Jun 22, 2025
48 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Jun 27, 2025
[FIX] Arrow ArrowBool8 Extension Type Add Validity Type Check (duckdb/duckdb#18005)
On Windows CI use zip from msys2 instead of choco (duckdb/duckdb#17993)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Jun 27, 2025
[FIX] Arrow ArrowBool8 Extension Type Add Validity Type Check (duckdb/duckdb#18005)
On Windows CI use zip from msys2 instead of choco (duckdb/duckdb#17993)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
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