Re: memory leak in the new power operator tests

From: Date: Thu, 06 Feb 2014 16:34:33 +0000
Subject: Re: memory leak in the new power operator tests
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Thu, Feb 6, 2014 at 4:40 PM, Ferenc Kovacs <[email protected]> wrote:

> Hi,
>
> After Bob merged the pow related changes, executing the new tests with
> --enable-debug I've got two memory leaks:
>
> [tyrael@Ferencs-MacBook-Pro-135 php-src.git (PHP-5.6.0 ✗)]$ cat
> ext/standard/tests/math/pow_variation1_64bit.diff
> ext/standard/tests/math/pow_variation2.diff
> 083+ [Thu Feb  6 16:20:51 2014]  Script:
> 
> '/Users/tyrael/checkouts/php-src.git/ext/standard/tests/math/pow_variation1_64bit.php'
> 084+ /Users/tyrael/checkouts/php-src.git/Zend/zend_API.c(314) :  Freeing
> 0x10D280C50 (72 bytes),
> script=/Users/tyrael/checkouts/php-src.git/ext/standard/tests/math/pow_variation1_64bit.php
> 085+ /Users/tyrael/checkouts/php-src.git/Zend/zend_variables.c(141) :
> Actual location (location was relayed)
> 086+ === Total 1 memory leaks detected ===083+ [Thu Feb  6 16:20:51 2014]
>  Script:
>  '/Users/tyrael/checkouts/php-src.git/ext/standard/tests/math/pow_variation2.php'
> 084+ /Users/tyrael/checkouts/php-src.git/Zend/zend_API.c(314) :  Freeing
> 0x10CB8CBE0 (72 bytes),
> script=/Users/tyrael/checkouts/php-src.git/ext/standard/tests/math/pow_variation2.php
> 085+ /Users/tyrael/checkouts/php-src.git/Zend/zend_variables.c(141) :
> Actual location (location was relayed)
> 086+ === Total 1 memory leaks detected ===%
>
> not sure if these were originally in the PR or just something went wrong
> with the merge/cherry pick, but would be nice if somebody could look into
> it.
> thanks!
>
> --
> Ferenc Kovács
> @Tyr43l - http://tyrael.hu
>

it seems the leak occures when pow() is called with an array:
[tyrael@Ferencs-MacBook-Pro-135 php-src.git (PHP-5.6.0 ✗)]$ ./sapi/cli/php
-r 'pow(array(),2);'
[Thu Feb  6 17:32:43 2014]  Script:  '-'
Zend/zend_vm_execute.h(28951) :  Freeing 0x1100B9ED8 (72 bytes), script=-
/Users/tyrael/checkouts/php-src.git/Zend/zend_API.c(1011) : Actual location
(location was relayed)
=== Total 1 memory leaks detected ===

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu


Thread (4 messages)

« previous php.internals (#72345) next »