Skip to content

Segfault when attempting to replace a list-column with an atomic vector of incorrect length #4729

@peterlittlejohn

Description

@peterlittlejohn

Hello data.table team:

Here's a segfault that seems different from the other ones in current issues:

d <- data.table(a=1:3)
d[,b:=list(c(1,2))]  ## all ok
d
#   a   b
# 1: 1 1,2
# 2: 2 1,2
# 3: 3 1,2

d[,b:=rep(c(1,2),2)] ## yes, this is the wrong thing to do
d  ## but the consequence is a bit harsh

*** caught segfault ***
address 0x4, cause 'memory not mapped'

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

library(data.table)
data.table 1.13.0 using 20 threads (see ?getDTthreads). Latest news: r-datatable.com

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