Date: 12/29/00
- Next message: anders <email protected>: "[PHP-DEV] PHP 4.0 Bug #8483: xslt_run results in Fatal error: msgtype:"
- Previous message: jmoore <email protected>: "[PHP-DEV] PHP 4.0 Bug #6642 Updated: Userspace exploit crashes web-serving machine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 8463
Updated by: sniper
Reported By: greg <email protected>
Old-Status: Open
Status: Feedback
Bug Type: Reproduceable crash
Assigned To:
Comments:
1. your test script is buggy, it should be like this:
usort( $mblist, "testcmp" );
(notice the "'s)
2. I tried this with the latest CVS and it doesn't crash.
Please try the latest snapshot from http://snaps.php.net/
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-12-28 13:13:55] greg <email protected>
Using usort() with an internal function segfaults, for example using strcasecmp() in the usort call will fail, but making a function in php called testcmp() which then calls strcasecmp() works fine.
This worked in 4.0.3 and below
In the following code snipit, the script will print 1 and 2 but crash before 3.
$mblist[0] = "Drafts";
$mblist[1] = "LRP";
$mblist[2] = "Sent Items";
$mblist[3] = "INBOX";
$mblist[4] = "Apache";
$mblist[5] = "Internet";
$mblist[6] = "Lists";
$mblist[7] = "People";
$mblist[8] = "Personal";
Function testcmp( $a, $b )
{
return strcasecmp( $a, $b );
}
echo "1<BR>";
flush();
usort( $mblist, testcmp );
echo "2";
flush();
usort( $mblist, strcasecmp );
echo "3";
flush();
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8463
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: anders <email protected>: "[PHP-DEV] PHP 4.0 Bug #8483: xslt_run results in Fatal error: msgtype:"
- Previous message: jmoore <email protected>: "[PHP-DEV] PHP 4.0 Bug #6642 Updated: Userspace exploit crashes web-serving machine"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

