php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56341 directive tidy.default_config causes memory leak
Submitted: 2005-03-07 10:17 UTC Modified: 2005-06-17 13:27 UTC
From: tigerfan777 at sina dot com Assigned:
Status: Not a bug Package: tidy (PECL)
PHP Version: 5.0.3 OS: windows2000 advanced server sp4
Private report: No CVE-ID: None
 [2005-03-07 10:17 UTC] tigerfan777 at sina dot com
Description:
------------
Using configuration directive tidy.default_config to specify tidy's configuration file causes memory leak.


Reproduce code:
---------------
Running the following command

  php -d max_execution_time=0 \
      -d max_input_time=0 \
      -d tidy.default_config="C:\php-5.0.3\tidy.cfg" \
      -r "while (true) { new tidy(); }"

and using task manager, you can see the memory used by php.exe increases steadily.

Running the following command

  php -d max_execution_time=0 \
      -d max_input_time=0 \
      -d tidy.default_config="" \
      -r "while (true) { new tidy(); }"

the memory usage is stable.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-17 07:38 UTC] nlopess at -php dot net
This isn't clearly a problem in PHP.

A I don't think its a bug in the libtidy also, because it frees the memory when the process ends.
Valgrind output:
==4192== 364 bytes in 1 blocks are still reachable in loss record 3 of 5
==4192==    at 0x1B905CAC: malloc (vg_replace_malloc.c:131)
==4192==    by 0x1BCFD3AE: (within /lib/libc-2.3.4.so)
==4192==    by 0x1BCFD46E: _IO_fopen (in /lib/libc-2.3.4.so)
==4192==    by 0x82A0E60: ParseConfigFileEnc (config.c:652)

If you believe there's a bug, please report it to libtidy at http://tidy.sf.net

Nuno

P.S.: I don't have rights to close bugs in pecl, so leaving that for someone else.
 [2005-06-17 13:27 UTC] john@php.net
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit http://pecl.php.net/support/ as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

Not ext/tidy issue
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC