From kevin.hendricks at sympatico.ca  Tue Jul 18 14:59:09 2006
From: kevin.hendricks at sympatico.ca (Kevin B. Hendricks)
Date: Tue, 18 Jul 2006 08:59:09 -0400
Subject: [Rd] Final patch for bug 8141 - rewriting substituteList
Message-ID: <87988B59-3A15-4F32-A147-B727D2169744@sympatico.ca>

Hi,

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.

Thanks,

Kevin


> 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 at 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.


-------------- next part --------------




[Rd] Final patch for bug 8141 - rewriting substituteList
Kevin B. Hendricks