Skip to content

[REVIEW] CSV Reader: Fix a segfault when byte range aligns with a page - #1044

Merged
mjsamoht merged 6 commits into
NVIDIA:branch-0.6from
vuule:bug-ext-csv-page-aligned-byte-range
Feb 27, 2019
Merged

[REVIEW] CSV Reader: Fix a segfault when byte range aligns with a page#1044
mjsamoht merged 6 commits into
NVIDIA:branch-0.6from
vuule:bug-ext-csv-page-aligned-byte-range

Conversation

@vuule

@vuule vuule commented Feb 25, 2019

Copy link
Copy Markdown
Contributor

Fixes rapidsai/dask-cudf#102

  • Remove the extra byte that was copied from the last chunk in launch_storeRecordStart(). The intent was to copy an extra byte for all chunks except the last one, but the implementation did the opposite. This cause a segfault when the map size aligns with a page.
  • Remove the code to explicitly handle \r\n terminator in storeRecordStart() and countRecords(), since regular check (\n) can cover this case too.
    *When mapping the file, num_bytes is now updated to account for page padding in all cases.
    *Add a test for the failing case.

… not needed to correctly parse with this terminator. Fixes a segfault when map size alignes with a page.
@vuule vuule changed the title [WIP] CSV Reader: Fix a segfault when byte range alings with a page [REVIEW] CSV Reader: Fix a segfault when byte range alings with a page Feb 26, 2019
Comment thread CHANGELOG.md Outdated
Co-Authored-By: vuule <vukasin.milovanovic.87@gmail.com>

@j-ieong j-ieong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to fix the typo in the PR title as well.

@vuule vuule changed the title [REVIEW] CSV Reader: Fix a segfault when byte range alings with a page [REVIEW] CSV Reader: Fix a segfault when byte range aligns with a page Feb 27, 2019
@vuule

vuule commented Feb 27, 2019

Copy link
Copy Markdown
Contributor Author

You need to fix the typo in the PR title as well.

Fixed.

@mjsamoht
mjsamoht merged commit 94fa0bc into NVIDIA:branch-0.6 Feb 27, 2019
@vuule
vuule deleted the bug-ext-csv-page-aligned-byte-range branch February 27, 2019 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 - In Progress Currently a work in progress cuIO cuIO issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants