On 09/08/2014, at 9:30 AM, srean wrote: > Great job. I would imagine using valgrind on a system that has its own > garbage collector and associated tricks would be quite hard as valgrind > wouldnt know of some of the optimizations. Valgrind can be glacial, but in > terms of coverage I dont know of any better.
Valigrind reports use of uninitialised variables due to the GC doing a conservative scan of the stack. It also does understand that some objects are reachable because there is a pointer to it encoded in a Judy array. Nevertheless it's still useful, as noted. However .. the webserver is still leaking :) > > I think the bugs that you have discovered does explain the observed behavior: > > i) cpu usage blowing up -> POST related infinite loop > ii) memory leak -> cstring leak But not the only leak. 582 felixweb 20 0 189m 27m 2320 S 0.0 5.7 0:42.83 flx_web That's 5.7% of memory. It started under 1%, so its still leaking. > BTW any thoughts (apart from be disciplined and careful) on how one may avoid > these cstring like bugs in their own Felix code. I always try to learn > something from bugs. Sure: don't use C strings :) Felix tries to provide better safety, but interfacing to C means all bets are off. The type system can't help as much when you do that. It's the same in Ocaml. If you get the C interface wrong the type system can't help you. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language