On 19/10/2010, at 1:29 PM, john skaller wrote:
>
> On 19/10/2010, at 1:14 PM, john skaller wrote:
>>
>> Well i have just run the webserver with FLX_DEBUG on and I got a crash
>> whilst garbage collecting:
>>
>> ....
>> Garbage 0x10010e8c0=address
>> Garbage 0x10010e8d0=address
>> Garbage 0x10010e900=_at19582
>> Segmentation fault
>
I patched the webserver generated C++ as so:
//OFFSETS for array type 19582
static void _at19582_finaliser(collector_t *, void *p){
fprintf(stderr,"Skipping finalisation\n");
//((_a3926t_19579*)p)->~_a3926t_19579();
}
static gc_shape_t _at19582_ptr_map = {
&thread_frame_t_ptr_map,
"_at19582",
2,
sizeof(_at19582),
_at19582_finaliser,
0,0,
gc_flags_default
};
This is the type string * string (array or tuple of two strings). The finaliser
is
for one string (see the count 2).
With that patch to stop the finaliser .. the webserver seems to run without
crashing no matter
how hard I pound it.
The address passed to the finaliser seems to be wrong. Other finalisers work
fine,
including finalisation of a single string.
notes: in Felix a string is a C++ string. Finalisers execute destructors.
If you say a primitive type is "pod" it will not be finalised, this is to speed
up collection. Clearly "string" does need finalisation.
So I think I have seriously narrowed down at least one problem now :)
Grrr .. that took, what, 3 YEARS? [The gc has had sporadic crashes for
since before I took a holiday to work on my boat].
--
john skaller
[email protected]
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language