[php-maint] Bug#513916: Bug#513916: php5: php <= 5.2.0-8+etch13 (debian etch): PHP Bug #40191: use of array_unique triggers segfault. http://bugs.php.net/bug.php?id=40191

Dino Ciuffetti dino at tuxweb.it
Tue Feb 3 20:48:03 UTC 2009


Hi Sean.

> however, if you are motivated to do the work yourself, please feel
> encouraged to dig up the specific commits that address the problem.

Sure!

> if you can find the specific fix,
> and the patch is clear and simple enough, then we can propose the
> including
> the fix in a version that we send to stable-proposed-updates.

The patch (Tested. It fix the problem.) is clear and VERY simple and is
attached. Please try to propose to the stable updates.

Below, the tests I have done.


root at giubox:/mnt/samba/Downloads# apt-get -t stable source php5
Lettura della lista dei pacchetti in corso... Fatto
Generazione dell'albero delle dipendenze in corso
Lettura informazioni sullo stato... Fatto
È necessario prendere 8707kB di sorgenti
Get:1 ftp://debian.fastweb.it stable/main php5 5.2.0-8+etch13 (dsc) [1978B]
Get:2 ftp://debian.fastweb.it stable/main php5 5.2.0-8+etch13 (tar) [8583kB]
Get:3 ftp://debian.fastweb.it stable/main php5 5.2.0-8+etch13 (diff) [121kB]
Scaricato 8707kB in 33s (257kB/s)
dpkg-source: extracting php5 in php5-5.2.0
dpkg-source: info: unpacking php5_5.2.0.orig.tar.gz
dpkg-source: info: applying php5_5.2.0-8+etch13.diff.gz
root at giubox:/mnt/samba/Downloads# cd php5-5.2.0/
root at giubox:/mnt/samba/Downloads/php5-5.2.0# cp
../temp/php-5.2.0/array_unique_bug.patch .
root at giubox:/mnt/samba/Downloads/php5-5.2.0# patch -p0
<array_unique_bug.patch
patching file ext/standard/array.c
root at giubox:/mnt/samba/Downloads/php5-5.2.0# ./configure --prefix=/tmp/php1
...
root at giubox:/mnt/samba/Downloads/php5-5.2.0# make
...
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

nobody at giubox:/mnt/samba/Downloads/temp/php-5.2.0$ make install
Installing PHP SAPI module:       cgi
Installing PHP CGI into: /tmp/php1/bin/
Installing build environment:     /tmp/php1/lib/php/build/
Installing header files:          /tmp/php1/include/php/
Installing helper programs:       /tmp/php1/bin/
  program: phpize
  program: php-config
Installing man pages:             /tmp/php1/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /tmp/php1/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR           - already installed: 1.4.11
Wrote PEAR system config file at: /tmp/php1/etc/pear.conf
You may want to add: /tmp/php1/lib/php to your php.ini include_path
Installing PDO headers:          /tmp/php1/include/php/ext/pdo/
nobody at giubox:/mnt/samba/Downloads/temp/php-5.2.0$
nobody at giubox:/mnt/samba/Downloads/temp/php-5.2.0$ echo -e '<?php
$arrObj = new ArrayObject();
$arrObj->append('foo');
$arrObj->append('bar');
$arrObj->append('foo');

$arr = array_unique($arrObj);
print_r($arr);
?>' > sapi/cli/bug.php
nobody at giubox:/mnt/samba/Downloads/temp/php-5.2.0$
nobody at giubox:/mnt/samba/Downloads/temp/php-5.2.0$ /tmp/php1/bin/php
sapi/cli/bug.php
X-Powered-By: PHP/5.2.0
Content-type: text/html

Array
(
    [0] => foo
    [1] => bar
)


Bug was fixed.
Ciao, Dino.


-- 
Dino Ciuffetti
Linux System Administrator and Architect
-----------------
TuxWeb S.r.l. - InfoServices EveryWhere - http://www.tuxweb.it
Soluzioni informatiche, sviluppo, applicazioni web, consulenze sistemistiche e su prodotti opensource, corsi Linux e molto altro ancora! Per maggiori informazioni scrivi a info at tuxweb.it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: array_unique_bug.patch
Type: application/octet-stream
Size: 990 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20090203/c491320e/attachment.obj 


More information about the pkg-php-maint mailing list