Open charlesbluca opened 3 years ago
This issue has been labeled inactive-30d
due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d
if there is no activity in the next 60 days.
This issue has been labeled inactive-90d
due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.
this reproduces with cudf 22.12.01
(rapids) root@184d4f7274bc:/rapids/notebooks# python
Python 3.8.15 | packaged by conda-forge | (default, Nov 22 2022, 08:46:39)
[GCC 10.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cudf
>>>
>>> filename = 'foo.csv'
>>> lines = [
... "num,text",
... "123,abc",
... "456,def",
... "789,ghi"
... ]
>>>
>>> with open(filename, 'w') as fp:
... fp.write('\n'.join(lines)+'\n')
...
33
>>> cudf.read_csv(filename, usecols=[2])
Segmentation fault (core dumped)
Describe the bug When specifying an out of range column index for
usecols
when usingread_csv()
(e.g.usecols=[2]
for a 2 column CSV file), an illegal memory access occurs - this can sometimes lead to segfault.Steps/Code to reproduce bug Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.
Expected behavior I would expect a
ValueError
, similar to what Pandas throws in the same scenario:Environment overview (please complete the following information)
Environment details
Click here to see environment details
Additional context I encountered this bug while looking into #8973