Hi Janne,

I'd prefer to add the zero check to runtime/memory.c
(internal_malloc_size), i.e. change

if (size == 0)
   return NULL;

to

if (size == 0)
   size = 1;


Good point.  I have done so in the attached patch, plus removed
all special cases for checking for zero size.

Regression-tested.  OK for trunk?

For 4.6, I would just commit the change to internal_malloc_size
(which would also fix PR 49479), plus the test case for that
PR.

OK?

Regards

        Thomas

Reply via email to