The executor() change from alloca() to emalloc() seems to have introduced a
memory leak (found it with --enable-debug). Before I try and fix it, are we
reverting back to do_alloca(), free_alloca()? (even though we should see
why this memory leak is happening anyway because we don't always use
alloca() for do_allocat()).
Andi
Hello Andi,
the easiest way to make the test suit for 5.1 work again is to
change zend_execute.c line 1352 to:
EX(Ts) = (temp_variable *) safe_emalloc(sizeof(temp_variable), op_array->T, 1);
notice the 1 instead of 0 which allocates one additional byte for every
execution.
regards
marcus
Thursday, July 22, 2004, 11:25:57 PM, you wrote:
The executor() change from alloca() to emalloc() seems to have introduced a
memory leak (found it with --enable-debug). Before I try and fix it, are we
reverting back to do_alloca(), free_alloca()? (even though we should see
why this memory leak is happening anyway because we don't always use
alloca() for do_allocat()).
Andi
--
Best regards,
Marcus mailto:helly@php.net
Why do we need one extra byte?
Anyway, the question is if we should return to alloca() or not. I am
slightly in favor but don't feel very strongly about it.
Andi
At 08:44 AM 7/23/2004 +0200, Marcus Boerger wrote:
Hello Andi,
the easiest way to make the test suit for 5.1 work again is to
change zend_execute.c line 1352 to:
EX(Ts) = (temp_variable *) safe_emalloc(sizeof(temp_variable),
op_array->T, 1);notice the 1 instead of 0 which allocates one additional byte for every
execution.regards
marcusThursday, July 22, 2004, 11:25:57 PM, you wrote:
The executor() change from alloca() to emalloc() seems to have introduced a
memory leak (found it with --enable-debug). Before I try and fix it, are we
reverting back to do_alloca(), free_alloca()? (even though we should see
why this memory leak is happening anyway because we don't always use
alloca() for do_allocat()).Andi
--
Best regards,
Marcus mailto:helly@php.net
Why do we need one extra byte?
We do not.
Anyway, the question is if we should return to alloca() or not. I am
slightly in favor but don't feel very strongly about it.
Perhaps we could try a combination of the two, to ensure that no script is
terminated due to a PHP crash if allocating on the stack fails. By default we
can use alloca() if that fails to allocate the memory, we could use emalloc()
and set a flag free code indicating which free function should be used.
Ilia