guile-devel
[Top][All Lists]
Advanced

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

Re: GUILE_MAX_HEAP_SIZE


From: Ludovic Courtès
Subject: Re: GUILE_MAX_HEAP_SIZE
Date: Mon, 18 Aug 2008 17:55:21 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> Ludovic Courtès escreveu:

>> 
>>   * 51ef99f7fa9fb766fbb48619fc5863ab9914591d
>>     Fix memory corruption issue with hell[] array: realloc/calloc need to
>>     factor in sizeof(scm_t_bits)
>> 
>>     -  hell = scm_malloc (hell_size);
>>     +  hell = scm_calloc (hell_size * sizeof(scm_t_bits));
>> 
>>     Good catch, but it should read:
>> 
>>        hell = scm_calloc (hell_size * sizeof (*hell));
>> 
>>     `sizeof (*hell)' is actually `sizeof (scm_t_bits *)', which is equal
>>     to `sizeof (scm_t_bits)', but using `sizeof (*hell)' is clearer and
>>     less error-prone.
>> 
>>     Besides, is that code only used when the one changes the class of an
>>     instance?  How did you trigger it?
>
> valgrind. Fixed.

Not quite actually: the "hell = scm_malloc (...)" bit is still broken.

BTW, can you please avoid pushing small topic branches like "nit" and
"dev/with-gnulib" to Savannah, as we can't distinguish them from "big"
branches like "vm"?

Thanks,
Ludovic.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]