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 upfrollapply() issues #3993
frollapply() issues #3993
Comments
|
I think you also get this C stack overflow from the other double pointer array constructed on the stack Line 299 in b8dd0db > frollapply(as.list(rep(1, 1e6)), 1, identity)
Error: segfault from C stack overflow |
|
Thanks for reporting. Yes, initialising like that was not good idea, as for large |
Hi all, I was reading the source for
frollapply(), and saw two things that I thought might be problematic.The first is a protection stack overflow. I think that looping here and constructing a SEXP for both the window and the call for each
kis causing this issue. You could probably restructure this loop to be inside the double loop below it (which you might also have to reverse the order of) to only construct them one at a time, and unprotect them after each usage.data.table/src/frollR.c
Line 316 in b8dd0db
The other is a C stack overflow. I imagine this is related, and comes from constructing this double pointer array on the stack (and maybe the SEXP arrays as well, but im not sure).
nk = 1e6is pretty big.data.table/src/frollR.c
Line 310 in b8dd0db