|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37349 memory corruption within run-tests.php
Submitted: 2006-05-07 17:40 UTC Modified: 2006-08-08 19:33 UTC
From: Assigned: pollita (profile)
Status: Closed Package: Tidy (PECL)
PHP Version: 6CVS-2006-05-07 (CVS) OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2006-05-07 17:40 UTC]
the streams layer corrupt the memory when running the run-tests.php on a tidy extension test

Reproduce code:
TEST_PHP_EXECUTABLE="./sapi/cli/php" valgrind ./sapi/cli/php run-tests.php -U ext/tidy/tests/020.phpt


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-07 18:41 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2006-05-07 18:50 UTC]
I already sent a mail to the mailing list with more details. I just opened the bug so that it doesn't get lost.
 [2006-05-07 22:24 UTC]
Maybe Sara is the best person to look into this (as she implemented the Unicode streams stuff).
 [2006-05-24 21:53 UTC]
Is this still valid?
I can't reproduce it with the latest CVS.
 [2006-05-25 17:06 UTC]
yep, it is still valid. This bug has nothing to do with tidy itself. It happens that I made a test for tidy that triggered a problem somewhere else.
 [2006-05-26 06:38 UTC]
Okay, but how to reproduce it?
 [2006-05-26 18:03 UTC]
Tony: its in my first comment :)
You just need to run valgrind on run-tests.php while testing the tidy/tests/020.phpt file. This produces a nice error message: 'BORK TEST', along with a huge valgrind report. (also, the problem might be in ICU. I haven't look further though)
 [2006-05-27 09:33 UTC]
Nuno, you must be kidding:
[24 May 9:53pm UTC] 
I can't reproduce it with the latest CVS.
I said I don't see any valgrind warnings with any of tidy tests, what's the point to refer to your first post?
What exactly do you get?
 [2006-05-27 09:40 UTC]
no, Tony, I'm not :)
I'll update ICU to check if that is the problem.
 [2006-05-27 09:56 UTC]
I've upgraded ICU to version 3.4.1 and I still get the same problems:
 [2006-06-10 23:31 UTC]
I've updated the valgrind report, now with ICU 3.5-cvs (contains a fix to a related bug I've reported). Now the report is smaller.
IMHO, this is surely a streams problem. as fair as I can see the code isn't calculaing the buffer length correctly when passing that value to u_memchr().

Sara, can you please check this problem? You are the best (if not the only) person who can fix this.
 [2006-08-01 22:21 UTC]
Nuno, please check if it's still reproducible with the latest CVS.
 [2006-08-08 19:33 UTC]
Ah, finally it's working :) It was probably fixed by the latest bunch of patches from Sara.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Oct 03 02:03:44 2022 UTC