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

rbindlist segfault #2019

Closed
arunsrinivasan opened this issue Feb 9, 2017 · 1 comment
Closed

rbindlist segfault #2019

arunsrinivasan opened this issue Feb 9, 2017 · 1 comment
Labels
Milestone

Comments

@arunsrinivasan
Copy link
Member

@arunsrinivasan arunsrinivasan commented Feb 9, 2017

Commit 2706 segfaults rbindlist when used with idcol argument.

require(data.table)
dt <- setDT(lapply(1:11, function(x) sample(letters, 1e4L, TRUE)))

ll <- lapply(1:3000, function(x) {
  if (runif(1) > 0.5) data.table() else dt[sample(1000L)]
})

# works fine
for (i in 1:50) {
  ans1 <- rbindlist(ll)
}

# segfaults
for (i in 1:50) {
  ans2 <- rbindlist(ll, idcol="id")
}

The current CRAN version segfaults. Narrowed it down to commit 2706.

@mllg
Copy link
Contributor

@mllg mllg commented Apr 14, 2017

Here is an example which is easier to reproduce:

require(data.table)
x <- list(list(a = 1), list(), list(a = 2))
rbindlist(x, idcol = "id")

This is fixed with #2077, but I'm not sure where to put the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants