[Rd] Final patch for bug 8141 - rewriting substituteList

From: Kevin B. Hendricks <kevin.hendricks_at_sympatico.ca>
Date: Tue 04 Jul 2006 - 18:21:15 GMT


Attached is both the patch and a gzipped version of the patch that is the fix for bug 8141 - rewriting substituteList in coerce.c to use a loop instead of recursion to walk the list.

The new version passes all of my tests (make check-all, etc) and I have used it with no negative impact to my work (as verified by comparing before and after tests) so far.

The new version fixes the C-stack overflow problem documented in the 8141 bug report.

[kbhend@base3 ~]$ cat test.r
dfn <- rep(list(rep(0,2)),300000)
test <- as.data.frame.list(dfn)

which no longer fails on the development tree with this patch in place.

I realize it is hard to verify this patch as correct since it converts recursion back into a loop. There has been no official code review as far as I can tell by anyone so far.

So perhaps it could be introduced into 2.4.0 with an environment variable switch to allow users to switch back to the old version to add more evidence as to its correctness.

As I said, I have used the patch without problems in my day to day work.

Also, if there are other annoying low level bugs out there people would like tracked down and fixed, please point me at them.



R-devel@r-project.org mailing list
Received on Wed Jul 05 04:23:08 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 04 Jul 2006 - 20:26:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.