Skip to content

Segfault on file ending with blank line with read_lines(skip_empty_rows = T) #968

@antoine-sachet

Description

@antoine-sachet

Even with the latest github version, using read_lines(file, skip_empty_rows=T) with a file ending with a a blank line causes a segmentation fault.

Reproduce with a container:

FROM rocker/r-ver:3.5.2
RUN install2.r -s --error remotes
RUN installGithub.r tidyverse/readr

Shell in the container:

printf "test\n\n" > test.txt
r -e "readr::read_lines('test.txt', skip_empty_rows=T)"
# Segmentation fault (core dumped)

More details (running the container with --privileged to allow access to dmesg):

dmesg | tail -1
# [116539.485081] r[19864]: segfault at 7fb7191d3000 ip 00007fb711114aa5 sp 00007ffc8079c0f0 error 4 in readr.so[7fb7110c0000+91000]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions