Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Krister Karlström
Thanks Derick, it confirms version 0.63: Package: freetds-dev Priority: optional Section: devel Installed-Size: 2096 Maintainer: Ubuntu Core developers <[EMAIL PROTECTED]> Original-Maintainer: Steve Langasek <[EMAIL PROTECTED]> Architecture: i386 Source: freetds Version: 0.63-3.2ubuntu1 Depends:

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Derick Rethans
On Wed, 15 Oct 2008, Krister Karlström wrote: > Antony Dovgal wrote: > > > On 15.10.2008 12:55, Krister Karlström wrote: > > > Hi, > > > > > > On the Ubuntu server (where the problems occured) I'm not good enough to > > > figure out which version of FreeTDS that is boundled with PHP, but these >

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Krister Karlström
Antony Dovgal wrote: On 15.10.2008 12:55, Krister Karlström wrote: Hi, On the Ubuntu server (where the problems occured) I'm not good enough to figure out which version of FreeTDS that is boundled with PHP, but these packages are installed with PHP: I don't think it's bundled, it should be

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Derick Rethans
On Wed, 15 Oct 2008, Krister Karlström wrote: > On the Ubuntu server (where the problems occured) I'm not good enough to > figure out which version of FreeTDS that is boundled with PHP, but these > packages are installed with PHP: > > php5-sybase_5.2.4-2ubuntu5.3_i386.deb > php5-mssql_5.2.4-2ubun

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Antony Dovgal
On 15.10.2008 12:55, Krister Karlström wrote: > Hi, > > On the Ubuntu server (where the problems occured) I'm not good enough to > figure out which version of FreeTDS that is boundled with PHP, but these > packages are installed with PHP: I don't think it's bundled, it should be a separate pack

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Krister Karlström
Hi, On the Ubuntu server (where the problems occured) I'm not good enough to figure out which version of FreeTDS that is boundled with PHP, but these packages are installed with PHP: php5-sybase_5.2.4-2ubuntu5.3_i386.deb php5-mssql_5.2.4-2ubuntu5.3_i386.deb On the Slackware platform we're ap

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Derick Rethans
On Wed, 15 Oct 2008, Krister Karlström wrote: > OK, Thanks for the clue though! :) > > What do you think about Sean Finneys post about this bug? > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=423296 > > Debian has patched a memory bug that also ended up affecting the > php5-sybase extension

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Krister Karlström
OK, Thanks for the clue though! :) What do you think about Sean Finneys post about this bug? http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=423296 Debian has patched a memory bug that also ended up affecting the php5-sybase extension... /Krister Karlström Derick Rethans wrote: This gives

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Antony Dovgal
On 15.10.2008 12:06, Krister Karlström wrote: > Thanks for the advice Derick, valgrind gave this output with > USE_ZEND_ALLOC set to 0: > ==29752== Invalid write of size 1 > ==29752==at 0x4024D57: memcpy (mc_replace_strmem.c:402) > ==29752==by 0x406B0C1: dbconvert (in /usr/lib/libsybdb.s

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Derick Rethans
On Wed, 15 Oct 2008, Krister Karlström wrote: > Thanks for the advice Derick, valgrind gave this output with USE_ZEND_ALLOC > set to 0: This gives a very good clue - for some reason there is not enough memory allocated in the emalloc() call on line 911 of ext/mssql/php_mssql.c. For some reason

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Krister Karlström
Thanks for the advice Derick, valgrind gave this output with USE_ZEND_ALLOC set to 0: ==29752== Memcheck, a memory error detector. ==29752== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==29752== Using LibVEX rev 1854, a library for dynamic binary translation. ==29752== Copyri

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Derick Rethans
On Wed, 15 Oct 2008, Krister Karlström wrote: > run the same sample script with PHP 5.2.6 configured with --disable-all > --enable-debug --with-mssql on the Ubuntu Hardy machine. I did exactly the > same things on both the Slackware server and the Ubuntu, the output and > expected result was thoug

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Krister Karlström
Hi again, run the same sample script with PHP 5.2.6 configured with --disable-all --enable-debug --with-mssql on the Ubuntu Hardy machine. I did exactly the same things on both the Slackware server and the Ubuntu, the output and expected result was though different: Here's PHP:s output on Ub

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-15 Thread Krister Karlström
Hi! I downloaded a fresh copy of PHP-5.2.6 and configured it with --disable-all --enable-debug --with-mssql. PHP -v gives: PHP 5.2.6 (cli) (built: Oct 15 2008 10:30:23) (DEBUG) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies Valgrinds output

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-14 Thread sean finney
hi there, On Tue, Oct 14, 2008 at 09:55:27AM +0200, Pierre Joye wrote: > On Tue, Oct 14, 2008 at 8:46 AM, Krister Karlström > <[EMAIL PROTECTED]> wrote: > > About this bug #44872, I run my small sample script (posted on the bug > > reporting page) through valgrind and got the attached output. I'm

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-14 Thread Ilia Alshanetsky
Can you try to compile PHP with --disable-all --enable-debug and a flag for the mssql extension, then try to run valgrind. From the output it seems there maybe errors in dl() library. On 14-Oct-08, at 4:15 AM, Krister Karlström wrote: Hi, I run the script on a server in our production env

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-14 Thread Krister Karlström
Hi, I run the script on a server in our production environment, a slackware server with a self compiled PHP from source. The PHP version was 5.2.5. php-v gives the following: 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)

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-14 Thread Pierre Joye
hi, On Tue, Oct 14, 2008 at 8:46 AM, Krister Karlström <[EMAIL PROTECTED]> wrote: > About this bug #44872, I run my small sample script (posted on the bug > reporting page) through valgrind and got the attached output. I'm not sure > whether this shows that there's a leak in the mssql extension or

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-13 Thread Krister Karlström
Hi, About this bug #44872, I run my small sample script (posted on the bug reporting page) through valgrind and got the attached output. I'm not sure whether this shows that there's a leak in the mssql extension or if this is normal. Valgrind said that 853 bytes where definitely lost, does th

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-10 Thread Krister Karlström
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

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-10 Thread Pierre Joye
hi, On Fri, Oct 10, 2008 at 5:03 PM, Stefan Esser <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > >> 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 t

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-10 Thread Stefan Esser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > 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. valgrind cannot (by definition) see all memory problems

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-10 Thread Krister Karlström
OK, thanks Ilia! I'm gonna try the valgrind. Will report back later. /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 envi

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-10 Thread Krister Karlström
Hi, Yes, I do understand that you only support official versions of PHP and I totally agree with you. No, I haven't tried to catch the error using valgrind yet. I just wanted to raise the question, since I'm not really sure whether this is a problem caused by the Suhosin patch or if it's ind

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-10 Thread Ilia Alshanetsky
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 p

Re: [PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-10 Thread Pierre Joye
hi, On Fri, Oct 10, 2008 at 1:18 PM, Krister Karlström <[EMAIL PROTECTED]> 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 > Su

[PHP-DEV] Bug #44872 canary mismatch on efree() - heap overflow detected

2008-10-10 Thread Krister Karlström
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 wit