With this:

var ls = list (1,2);
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;
//leak = copy ls;
collect();
done;
////////////

~/felix>FLX_ALLOW_COLLECTION_ANYWHERE=0 ./lr
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
Segmentation fault

If I remove the explicit collection, it runs for a long time (uses 3.7 Gig VM 
on my mac which
only has 2G real) then I killed it waiting. So no crash without GC, and,
the FLX_ALLOW_COLLECTION_ANYWHERE flag is working.

What this means is that bug is unlikely to be in the stack scanning, which is 
the bit
added on to allow collections anywhere (i.e. even inside functions).

The collect() call delegates to the driver:

 proc collect() { svc svc_collect; }

so there's virtually no stack to scan.

This means the bug is most likely fundamental (in the core routines).

The error is certainly free-ing reachable memory: leaking can't cause a crash.
Or it is free-ing the wrong pointer (possible, the gmp test which fails gets
this error!). I.e. it is free-ing an interior pointer. However, there aren't any
of them in the list test case.

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