Friday, February 3, 2006, 12:00:16 PM, skaller wrote:
> On Fri, 2006-02-03 at 17:42 +0100, Nicolas Cannasse wrote:
>> In order to check that it's actually a bug inside a GC call, could you
>> wrap calls in "alloc.c" with printf before/after ? Maybe only needed in
>> the case of alloc_object if you crash on a $new call.
> How about just turning off garbage collection?
Good idea, thanks.
> Boehm has a 'leak detection' mode which doesn't free anything --
> we used that on my box getting the 64 bit version running.
I tried this:
void neko_gc_init( void *ptr ) {
GC_no_dls = 1;
#ifdef LOW_MEM
GC_dont_expand = 1;
#endif
GC_find_leak = 1; // <<<<<<<<<<<<<<
GC_clear_roots();
GC_set_warn_proc((GC_warn_proc)(void*)null_warn_proc);
}
No joy.
Then:
EXTERN void neko_gc_loop() {
// GC_collect_a_little();
}
EXTERN void neko_gc_major() {
// GC_gcollect();
}
No joy.
Then:
void neko_gc_init( void *ptr ) {
GC_no_dls = 1;
#ifdef LOW_MEM
GC_dont_expand = 1;
#endif
GC_find_leak = 1; // e
GC_clear_roots();
// GC_set_warn_proc((GC_warn_proc)(void*)null_warn_proc);
}
Still the exact same symptom...
(cd src; LD_LIBRARY_PATH=../bin: NEKOPATH=../boot:../bin ../bin/neko nekoml -v
neko/Main.nml nekoml/Main.nml)
try: nekoml.n
try: ..\bin/nekoml.n -1
try: ..\boot/nekoml.n 0
try: std.ndll
try: ..\bin/std.ndll 0
Parsed core/Core.nml
Typing Core.magic
Typing Core.throw
Typing Core.assert
Typing Core.invalid_arg
Typing Core.error
Typing Core.ignore
Typing Core.fst
Typing Core.snd
Typing Core.int
Typing Core.ord
Typing Core.chr
Typing Core.string
Typing Core.nstring
Typing Core.print
Typing Core.nprint
Typing Core.compare
Typing Core.min
Typing Core.max
Typing Core.sprintf
Typing Core.printf
Typing Core.stream
Typing Core.stream_token
Typing Core.stream_junk
Typing Core.stream_pos
Typing done with core/Core.nml
Compiling Core.n
make: *** [compiler] Error 5
> BTW: Doug, you're building with MSYS? Have you tried
> using Cygwin with gcc -mnocygwin?
Yes, MSYS.
I don't have Cygwin installed right now.
e
--
Neko : One VM to run them all
(http://nekovm.org)