On 15/01/2011, at 10:05 PM, john skaller wrote:

> There is a gc bug somewhere exhibited by this badly written program:


This simple functional one also fails:

//////////////////////
var ls = list (1,2,3,4);
var i: int;
forall i in 0 upto 100 do
ls = fold_left (fun (acc:list[int]) (elt:int) => Cons(elt,acc)) ls ls;
println$ len ls;
done;
///////////////

I checked the C++ and it doesn't use any list mutators, also the thread_frame_t 
and list node
shapes in rtti file are seeminly correct, which leaves the GC itself.

The crash depends on the GC: it segfaults later if I give it more memory to 
start with:

~/felix>FLX_MIN_MEM=10 ./lr
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
262144
Segmentation fault
~/felix>FLX_MIN_MEM=100 ./lr
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
262144
524288
1048576
2097152
Segmentation fault

I have to hope this is a bug in my gc code (and not Judy, because I can't fix 
that).

--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to