#19342 [NEW]: Memory Leak Setting Property Value
| From: | msisolak at yahoo dot com | Date: | Tue, 10 Sep 2002 18:35:44 +0000 |
| Subject: | #19342 [NEW]: Memory Leak Setting Property Value | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-18969@lists.php.net to get a copy of this message | ||
From: msisolak@yahoo.com
Operating system: Windows 2000
PHP version: 4.2.3
PHP Bug Type: COM related
Bug description: Memory Leak Setting Property Value
There appears to be a memory leak when setting a property value of a COM
object in 4.2.3. Running under ISAPI if this script is repeated memory
usage continues to grow:
$adodb = new COM("ADODB.Connection");
$adodb->ConnectionString = str_repeat("this is a text string!", 1000);
Looking through the patches that have been applied, I believe that this is
caused when COM.c went from 1.78 to 1.79 (which was then back-ported to
4.2.3). In this patch at the end of do_COM_propput(), this:
FREE_VARIANT(new_value);
became this:
efree(new_value); // FREE_VARIANT does a VariantClear() which is not
desired here !
If I reverse this patch I no longer see the leak and the code still
appears to be working correctly. What was the purpose of this change?
Does doing the FREE_VARIANT version cause some other issue?
--
Edit bug report at http://bugs.php.net/?id=19342&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19342&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19342&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19342&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19342&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19342&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19342&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19342&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19342&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19342&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19342&r=globals