Hi!

I re-run the small simple script that I posted on the bug tracking page. This time I used a Slackware server with PHP 5.2.5 (no Suhosin or other patches), compiled from source. php -v gives:

PHP 5.2.5 (cli) (built: Mar 28 2008 12:02:55)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

This is the summary of the run:

==3182== ERROR SUMMARY: 159 errors from 10 contexts (suppressed: 0 from 0)
==3182== malloc/free: in use at exit: 3,174 bytes in 23 blocks.
==3182== malloc/free: 44,130 allocs, 44,107 frees, 3,189,161 bytes allocated.
==3182== For counts of detected errors, rerun with: -v
==3182== searching for pointers to 23 not-freed blocks.
==3182== checked 541,584 bytes.
==3182==
==3182== LEAK SUMMARY:
==3182==    definitely lost: 853 bytes in 12 blocks.
==3182==      possibly lost: 0 bytes in 0 blocks.
==3182==    still reachable: 2,321 bytes in 11 blocks.
==3182==         suppressed: 0 bytes in 0 blocks.
==3182== Rerun with --leak-check=full to see details of leaked memory.

I need some help with analyzing the full output, so if it's OK for you Ilia I will mail you the full output from valgrind.

/Krister Karlström

Ilia Alshanetsky wrote:

The error messages comes from Suhosin, which is why a basic PHP environment does not exhibit this problem. What I can ask you to try is to run the affected code on a basic PHP environment through valgrind and see if it reports any errors. If it does not, there is a chance it maybe a false positive on the part of Suhosin. If it does report a problem however, then mssql extension has a bug and valgrind output should be good enough to identify the where & the why.


On 10-Oct-08, at 7:18 AM, Krister Karlström wrote:

Hi,

This bug #44872 puzzles me, I experienced it today running testcases with PHPUnit on command line, thus invoking PHP CLI. I'm working on a Ubuntu Hardy 8.0.4 server, using PHP 5.2.4-2ubuntu5.3 with
Suhosin-Patch 0.9.6.2 (cli).

The operation mssql_free_result() is terminated by Suhosin with the following message:

ALERT - canary mismatch on efree() - heap overflow detected (attacker
'REMOTE_ADDR not set', file 'TestMsSQL.php', line 16)

The bug report for this matter has status "No feedback". The bug was reported on 30 Apr 5:19pm UTC, and status was changed to "no feedback" on 10 May 1:00am UTC. However, after that some comments confirming this bug have been posted, including myself today.

Does anyone know where's the _source_ of this problem? Is it in the source code of PHP or in the Suhosin patch? I have not encountered this problem in a "pure" Slackware environment where the Suhosin patch is not used, so it seems like a Suhosin issue. It might as well be a bug in PHP that Suhosin catches...

Maybe someone should re-open this ticket?
http://bugs.php.net/bug.php?id=44872

Greetings,
Krister Karlström, Helsinki, Finland

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Ilia Alshanetsky


--
* Ing. Krister Karlström, Zend Certified Engineer         *
* Systemutvecklare, IT-Centralen                          *
* Arcada - Nylands Svenska Yrkeshögskola                  *
* Jan-Magnus Janssons plats 1, 00550 Helsingfors, Finland *
* Tel: +358(20)7699699  GSM: +358(50)5328390              *
* E-mail: [EMAIL PROTECTED]                       *

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to