Han-Wen Nienhuys <[EMAIL PROTECTED]> 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.