On 01/11/2011, at 4:27 PM, john skaller wrote: > > On 01/11/2011, at 1:30 PM, john skaller wrote: >> >> Grrr .. >> >> ~/felix>tools/flx_ls . '.*\.flx' >> Segmentation fault > > > Sigh .. looks like a bug in RE2 corrupting memory.. all these bugs are > tiresome .. > the idea of Felix is to get rid of these bugs ..:]
Hmm actually looks like the gc is at fault: d=build/release/tut/migration/mig-4-1.hpp d=build/release/tut/migration/mig-4-1.includes d=build/release/tut/migration/mig-4-1.o d=build/release/tut/migration/mig-4-1.os d=build/release/tut/migration/mig-4-1.par2 d=build/release/tut/migration/mig-4-1.resh d=build/release/tut/migration/mig-4-1.rtti d=build/release/tut/migration/mig-4-1.static.stdout Actually collect actually collected 611893 objects, still allocated 52372 bytes Actually collect actually collected 618089 objects, still allocated 110580 bytes Actually collect actually collected 615178 objects, still allocated 157156 bytes Actually collect actually collected 612940 objects, still allocated 192964 bytes d=build/release/tut/tutorial/tut-01.01-0 Segmentation fault The fault is RE2::Match(), but it happens on the first call after a collection. So we have to bet the collector is screwing something up. This line is a bit interesting: pv <- C_hack::cast[word] (new dst); This is assigning a pointer to a heap allocated copy of the string dst to the location pointed at by pv (the value store of the JudySL array). This object should be managed by the GC, and, scanned by the GC. Actually looking at the program .. I'm wondering what the heck it is being collected! And so now a theory: nothing should be collected. There are no heap objects floating around in this code .. except the judy array: var ds = JSLArray (); And this is the problem. The Judy array is on the STACK. So it isn't managed. It should be on the heap, otherwise all those "new" strings it is storing as values will be reaped. Exactly why this causes a problem is a mystery however.. -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ RSA® Conference 2012 Save $700 by Nov 18 Register now! http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language