Skip to content

Tarball of pandas-0.17.0 on PyPI contains crash in parser.c #11463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
b11z opened this issue Oct 28, 2015 · 1 comment
Closed

Tarball of pandas-0.17.0 on PyPI contains crash in parser.c #11463

b11z opened this issue Oct 28, 2015 · 1 comment
Labels
Build Library building on various platforms

Comments

@b11z
Copy link

b11z commented Oct 28, 2015

I experienced a crash in 0.17.0 when using a pandas that's built from PyPI:

import pandas as pd
import StringIO
f=StringIO.StringIO("id\n2015091624765185258700105041865\n")
pd.read_csv(f)
==> Segmentation Fault

I traced it to a null pointer dereference in parser.c as found in the tarball that's
on PyPI. It does not appear in a parser.c if I rebuild from parser.pyx
(IOW, it's not reproducible in a build of 0.17.0 from GitHub).

Is it possible that invalid cython generated files snuck into the 0.17.0 release?

This is the valgrind output which points at parser.c line 20849:

==26809== Invalid read of size 1
==26809==    at 0x4C2F122: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26809==    by 0x49C261: PyString_FromString (in /home/brian/bin/ipython-venv2/bin/python2)
==26809==    by 0xC641706: __pyx_f_6pandas_6parser__try_int64 (parser.c:20849)
==26809==    by 0xC658442: __pyx_f_6pandas_6parser_10TextReader__convert_with_dtype (parser.c:12372)
==26809==    by 0xC64893A: __pyx_f_6pandas_6parser_10TextReader__convert_tokens (parser.c:11744)

If you look at that line, the __pyx_v_word variable will be NULL.

$ python -c 'from pandas.util.print_versions import show_versions; show_versions()'

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Linux
OS-release: 3.19.0-32-lowlatency
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.17.0
nose: None
pip: 1.5.6
setuptools: 12.2
Cython: 0.23.4
numpy: 1.10.1
scipy: None
statsmodels: None
IPython: 4.0.0
sphinx: None
patsy: None
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.4.1
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
@jreback
Copy link
Contributor

jreback commented Oct 28, 2015

see the comment at the end of this thread.

apparently the parser.c was a slightly different version.

#11374

will be fixed for 0.17.1

@jreback jreback closed this as completed Oct 28, 2015
@jreback jreback added the Build Library building on various platforms label Oct 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

No branches or pull requests

2 participants