Skip to content
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

Fix CSV.Chunks crashing due to finalized buffer #763

Merged
merged 1 commit into from
Oct 29, 2020
Merged

Commits on Oct 29, 2020

  1. Fix CSV.Chunks crashing due to finalized buffer

    Fixes #734. The issue here is that on windows, we aggressively finalize
    the file source buffer as a way to "close" the file, since windows is
    much more picky when trying to modify an mmapped file after parsing.
    i.e. windows complains if you try to modify a file and there's still an
    mmap reference to it somewhere, so at the end of CSV.File, we call
    `finalize(buf)` to ensure it gets unmapped. The problem, however, is
    that `CSV.Chunks` calls `CSV.File` multiple times on the same `buf`,
    providing different starting/ending byte positions to read in chunks.
    So naturally, after the first chunk was read, the buffer was getting
    finalized and then the 2nd chunk immediately crashed trying to read its
    chunk from a finalized buffer.
    quinnj committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    f40ba1f View commit details
    Browse the repository at this point in the history