On 10/5/21 1:50 PM, Dominique Martinet wrote: > If I change malloc_usable_size to return p->mh_nbytes instead of > maxbytes, then the crash disappears.[2] > > I did not read the full bash malloc code but I suspect the buffer really > could be grown, but we would need to fix p->mh_nbytes to maxbytes and > also adjust the end block to pass sanity checks on free -- e.g. it > should be considered as a lightweight inplace realloc. > > I'm not sure we care enough to be honest and returning what is really > usable feels like the simplest solution, what do you think? >
Thanks for your work tracking this down. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/