Skip to content

BUG: read_csv segmentation fault in version 2.3.3 #63167

@joachimovesen

Description

@joachimovesen

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

import pandas
import io

text = "00000000895e440025563900000000000000000000000000f7b3a602c4540000e0b20300bebd510000000000011001040170010c0000000000"
buffer = io.StringIO(text)
res = pandas.read_csv(buffer, header=None)

Issue Description

Pandas read_csv function results in Segmentation fault (core dumped) with pandas version 2.3.3 (works with 2.2.3)
Stack trace extracted using faulthandler:

Fatal Python error: Segmentation fault

Current thread 0x0000794b945d5080 (most recent call first):
  File "XXX/venv/lib/python3.12/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 234 in read
  File "XXX/venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1923 in read
  File "XXX/venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 626 in _read
  File "XXX/venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1026 in read_csv
  File "XXX/test.py", line 8 in <module>

Segmentation fault (core dumped)

Expected Behavior

Should not result in segmentation fault.

Installed Versions

INSTALLED VERSIONS

commit : 9c8bc3e
python : 3.12.3
python-bits : 64
OS : Linux
OS-release : 6.14.0-35-generic
Version : #35~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct 14 13:55:17 UTC 2
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 2.3.3
numpy : 2.2.3
pytz : 2025.1
dateutil : 2.9.0.post0
pip : 24.0
Cython : None
sphinx : None
IPython : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
blosc : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
html5lib : None
hypothesis : None
gcsfs : None
jinja2 : None
lxml.etree : 5.3.1
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
psycopg2 : None
pymysql : None
pyarrow : None
pyreadstat : None
pytest : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlsxwriter : None
zstandard : None
tzdata : 2025.1
qtpy : None
pyqt5 : None

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugClosing CandidateMay be closeable, needs more eyeballsIO CSVread_csv, to_csvSegfaultNon-Recoverable Error

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions