[Rd] Final patch for bug 8141 - rewriting substituteList

Kevin B. Hendricks kevin.hendricks at sympatico.ca
Tue Jul 4 20:21:15 CEST 2006


Hi,

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.

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


Kevin

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_8141.patch.gz
Type: application/x-gzip
Size: 944 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-devel/attachments/20060704/ffd7e14a/attachment.gz 
-------------- next part --------------
  
  


More information about the R-devel mailing list