php.net |  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: nlopess@php.net Assigned: pollita (profile)
Status: Closed Package: Tidy (PECL)
PHP Version: 6CVS-2006-05-07 (CVS) OS: n/a
Private report: No CVE-ID: None
 [2006-05-07 17:40 UTC] nlopess@php.net
Description:
------------
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

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] nlopess@php.net
I already sent a mail to the mailing list with more details. I just opened the bug so that it doesn't get lost.
http://news.php.net/php.internals/23030
 [2006-05-07 22:24 UTC] nlopess@php.net
Maybe Sara is the best person to look into this (as she implemented the Unicode streams stuff).
 [2006-05-24 21:53 UTC] tony2001@php.net
Is this still valid?
I can't reproduce it with the latest CVS.
 [2006-05-25 17:06 UTC] nlopess@php.net
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] tony2001@php.net
Okay, but how to reproduce it?
 [2006-05-26 18:03 UTC] nlopess@php.net
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] tony2001@php.net
Nuno, you must be kidding:
-----
[24 May 9:53pm UTC] tony2001@php.net 
<..>
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] nlopess@php.net
no, Tony, I'm not :)
I'll update ICU to check if that is the problem.
 [2006-05-27 09:56 UTC] nlopess@php.net
I've upgraded ICU to version 3.4.1 and I still get the same problems:
http://mega.ist.utl.pt/~ncpl/php6-tidy-valgrind.txt
 [2006-06-10 23:31 UTC] nlopess@php.net
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] tony2001@php.net
Nuno, please check if it's still reproducible with the latest CVS.
Thanks.
 [2006-08-08 19:33 UTC] nlopess@php.net
Ah, finally it's working :) It was probably fixed by the latest bunch of patches from Sara.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 02:03:33 2021 UTC