Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upsegfaults on R3.4.4 when i is NULL #4060
Comments
|
It's cause by this line: Line 54 in 6f17d18 When i is NULL, it will be converted to zero column data.table() first. Since i is now a zero column data.table object, the I don't know why it can't happen in R3.5 or R3.6 but I will file a PR later anyway. UPDATE: This is because the below code returns 0 on R3.5 or R3.6 but may be any garbage values on R3.4. I don't know the reason. Rcpp::cppFunction("int getlength(SEXP x) { return LENGTH(VECTOR_ELT(x,0)); }")
getlength(list()) |
The following code causes segfauls on R3.4.4.
I haven't tested it on other platforms yet.UPDATE: I've reproduced this on Linux.So I doubt it relates to the code handles the ALTREP, which is introduced from R3.5. However, I'm not sure since I haven't digged into this.Update: the segfault is triggered by
Cbmergeand I confirm data.table v1.12.3 also has this issue.