marinelay opened a new issue, #51230:
URL: https://github.com/apache/arrow/issues/51230
### Describe the bug, including details regarding any error messages,
version, and platform.
### Summary
Several exposed `flight` wrapper classes and `pyarrow.parquet.ParquetReader`
can be directly constructed without the native state expected by their methods
and properties.
The operations listed below terminate the interpreter with `SIGSEGV` when
used on those objects.
I grouped these cases because multiple operations across both groups fail in
the same uninitialized object state.
I think unsupported direct construction or use before `open()` should raise
a Python exception rather than terminate the process.
### Versions
PyArrow 25.0.1, CPython 3.12.3, Debian 12 x86_64, glibc 2.36.
### Reproducer
Run each operation independently in a fresh process.
```python
import pyarrow.flight as flight
flight.FlightMetadataReader().read()
flight.FlightStreamReader().read_all()
flight.MetadataRecordBatchReader().read_all()
flight.FlightStreamWriter().done_writing()
flight.MetadataRecordBatchWriter().close()
flight.FlightMetadataWriter().write(b"")
flight.ServerCallContext().peer()
```
```python
import pyarrow.parquet as parquet
parquet.ParquetReader().read_all()
parquet.ParquetReader().read_column(0)
parquet.ParquetReader().read_row_group(0)
parquet.ParquetReader().scan_contents()
parquet.ParquetReader().column_name_idx("name")
parquet.ParquetReader().set_batch_size(1)
parquet.ParquetReader().set_use_threads(True)
parquet.ParquetReader().column_paths
parquet.ParquetReader().num_row_groups
parquet.ParquetReader().schema_arrow
```
Each listed operation was recorded as terminating with:
```console
Segmentation fault (core dumped)
```
---
I found these cases while fuzzing Python C extension modules. If separate
reports would be easier to track, I can split them by component.
### Component(s)
Python
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]