From ulrich.poetter at ruhr-uni-bochum.de  Sun Sep 18 19:54:37 2005
From: ulrich.poetter at ruhr-uni-bochum.de (Ulrich Poetter)
Date: Sun, 18 Sep 2005 19:54:37 +0200
Subject: [Rd] as.data.frame segfaults on large lists (PR#8141)
In-Reply-To: <x2ll1u48wo.fsf@turmalin.kubism.ku.dk>
References: <20050918153744.AB3C0CC03@slim.kubism.ku.dk>
	<x2ll1u48wo.fsf@turmalin.kubism.ku.dk>
Message-ID: <17197.43485.477171.842775@borel.stat.ruhr-uni-bochum.de>

Peter Dalgaard writes:
 > ulrich.poetter at ruhr-uni-bochum.de writes:
 > 
 > > Full_Name: Ulrich Poetter
 > > Version: 2.1.1
 > > OS: i686-pc-linux-gnu FC2
 > > Submission from: (NULL) (134.147.95.187)
 > > 
 > > 
 > > as.data.frame() segfaults on lists with very many elements:
 > > 
 > > > dfn <- rep(list(rep(0,2)),198000)
 > > > test <- as.data.frame.list(dfn)
 > > 
 > > Process R segmentation fault at Sun Sep 18 17:06:02 2005
 > 
 > Not for me on FC4. The process size grows to about 180M and the system
 > thrashes badly, but the calculation runs to completion.
 > 
 > It's not unlikely that we are ignoring a failed allocation somewhere,
 > but there's not much hope of finding it from the available
 > information. You could try running under gdb and see where things go
 > wrong for you.
gdb says:

 dfn <- rep(list(rep(0,2)),198000)
 test <- as.data.frame.list(dfn)

Program received signal SIGSEGV, Segmentation fault.
0x08082416 in Rf_substituteList (el=0xa1c5634, rho=0x83ea668)
    at coerce.c:1973
1973	coerce.c: No such file or directory.
	in coerce.c
(gdb) bt
#0  0x08082416 in Rf_substituteList (el=0xa1c5634, rho=0x83ea668)
    at coerce.c:1973
[snip]
(I don't have the source handy). I have forgotten to say that R was
compiled with gcc 3.3.3.

All the best,
Ulrich Poetter



[Rd] as.data.frame segfaults on large lists (PR#8141)
Ulrich Poetter