Re: [Rd] Final patch for bug 8141 - rewriting substituteList

From: Kevin B. Hendricks <>
Date: Tue 18 Jul 2006 - 12:59:09 GMT


Is there anybody interested in this patch to fix bug 8141 - the rewriting substituteList in coerce.c?
If so, I have updated it to today's tree. Testers welcome as well.

If not, please let me know.



> 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 <-
> 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. mailing list Received on Tue Jul 18 23:01:05 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 18 Jul 2006 - 16:27:24 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.