Skip to content

[C++] BooleanArray true_count crashing in case of unknown null count (null_count = -1) without validity buffer #41016

@unj1m

Description

@unj1m

Applying pyarrow.compute.and_ produces corrupted arrays that segfault when you try to get their true_count.

$ python
Python 3.10.12 (main, Apr  4 2024, 12:45:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyarrow.compute
>>> a1 = pyarrow.array([True]*48 + [False]*48)
>>> a2 = pyarrow.array([True, False] * 48)
>>> pyarrow.compute.and_(a1, a2).true_count
Segmentation fault (core dumped)

There segfault started in pyarrow==9.0.0.

It doesn't happen in 7 or 8.

Component(s)

Python

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions