Skip to content

fread segfault #4644

@renkun-ken

Description

@renkun-ken

I'm using the latest data.table release and the following code causes segfault:

library(data.table)
md <- fread("~/data/20200724.sample.log.gz",
  col.names = c("localtime", "event", "exchange_id", "instrument_id", "exchange_time",
    "pre_close", "last_price", "volume", "turnover",
    "bid_price", "ask_price", "bid_volume", "ask_volume"
  ),
  colClasses = c(
    "character", "factor", "factor", "character", "character",
    "double", "double", "double", "double",
    "double", "double", "integer", "integer"
  )
)
 *** caught segfault ***
address 0x5c, cause 'memory not mapped'

The gzipped data is attached.

20200724.sample.log.gz

Both original file or gz causes segfault. If I only read some top rows (e.g. nrows = 100) it won't crash.

If I don't use colClasses, it won't cause segfault either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions