[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elk] Re: found bug related to GC crash



On Mon, Aug 09, 2004 at 08:37:18PM +0200, Sam Hocevar wrote:
> On Sat, Aug 07, 2004, martin rumori wrote:
> 
> > attached a patch which fixes a bug leading to crash the garbage
> > collector.  in the elk-3.0 code it's apparently present, too.

>    This patch does not look right to me. builtin_types[] has a trailing
> NULL value, whose index is (sizeof(builtin_types)-1)/sizeof(char*),
> which is the value returned by the first call to Define_Type(). Could
> you please check this again?

you are right, it's more like a workaround.  i tracked that down with
stopncopy gc in gdb and found out the first value of Define_Type() is
22, which is T_Broken_Heart according to object.h.  i compared the
list there to builtin_types[] and found out, that T_Unspecified is
missing in builtin_types[], that's why the calculation gives the wrong
result.  should there be added a "0unspecified" between "0end-of-file"
and "1autoload" in the list?

bests,

martin
-- 
This is the elk mailing-list, see http://sam.zoy.org/projects/elk/
Trouble unsubscribing? Please contact <sam@zoy.org>
List archives are at http://sam.zoy.org/projects/elk/threads.html