#27408 [Opn->Csd]: xmlrpc_decode segfaults on opteron

From: Date: Mon, 08 Mar 2004 19:04:10 +0000
Subject: #27408 [Opn->Csd]: xmlrpc_decode segfaults on opteron
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56119@lists.php.net to get a copy of this message
 ID:               27408
 Updated by:       abies@php.net
 Reported By:      gregor_macdougall at yahoo dot com
-Status:           Open
+Status:           Closed
 Bug Type:         XMLRPC-EPI related
 Operating System: Linux
 PHP Version:      4CVS-2004-02-27
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2004-03-08 13:21:40] gregor_macdougall at yahoo dot com

I can confirm that this bug does occur, and only occurs on 
our x86_64 systems.  Here is a log of me running the test 
code on the latest php5 snapshot (same thing occurs with 
php4 stable). 
 
php5 was built with "./configure --with-xmlrpc". 
 
Script started on Mon Mar  8 10:18:14 2004 
 
gregor@ariel:~ $ cat test.php 
<?php 
$response = '<?xml version="1.0"?> 
<methodResponse><params><param> 
<value><string>Test</string></value> 
</param></params></methodResponse>'; 
 
print xmlrpc_decode($response . "\n"); 
?> 
gregor@ariel:~ $ uname -sm 
Linux i686 
gregor@ariel:~r $ php5-200403081630/sapi/cli/php test.php 
Test 
gregor@ariel:~ $ ssh io 
gregor@io:~ $ uname -sm 
Linux x86_64 
gregor@io:~ $ php5-200403081630/sapi/cli/php test.php 
Segmentation fault 
gregor@io:~ $ logout 
gregor@ariel:~ $ ssh hyperion 
gregor@hyperion $ uname -sm 
Linux x86_64 
gregor@hyperion $ php5-200403081630/sapi/cli/php test.php 
Segmentation fault 
gregor@hyperion $ logout 
gregor@ariel:~ $ ssh pandora 
gregor@pandora:~> uname -sm 
Linux x86_64 
gregor@pandora:~> php5-200403081630/sapi/cli/php test.php 
Segmentation fault 
gregor@pandora:~> logout 
 
Script done on Mon Mar  8 10:20:19 2004 
 
ariel is my local x86 box, io, hyperion, and pandora are 
our 3 opteron servers.  The code runs successfully on the 
x86 box, and segfaults on all 3 opterons.

------------------------------------------------------------------------

[2004-03-08 12:25:20] iliaa@php.net

No crash with valid XML either. Leave bug as feedback until 
you or another user of a 64 bit system can confirm that the 
bug exists or if it is fixed. 

------------------------------------------------------------------------

[2004-03-08 02:43:38] gregor_macdougall at yahoo dot com

You need to make sure that the XML contained in the 
$response variable is properly formed XML. 
 
The interface for bugs.php.net caused a new line character 
to be placed in the midst of the </param> tag, which is 
not valid and causes the XML parse error you received. 
 
You can fix this by removing the new line in the </param> 
tag, and moving it to before the tag. 
 
Sorry for any confusion caused by this.

------------------------------------------------------------------------

[2004-03-07 22:52:47] iliaa@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I've tried running the given example using PHP 5 & 4 and 
got an identical response which looks like this: 
xpat reports error code 4 
        description: not well-formed (invalid token) 
        line: 3 
        column: 0 
        byte index: 95 
        total bytes: 0 
 
        data beginning 10 before byte index: lue></par 
am></params></methodResponse> 

------------------------------------------------------------------------

[2004-02-27 11:20:55] gregor_macdougall at yahoo dot com

A segfault also occurs with the most recent php5 cvs cnapshot.  If you
would like the backtrace information for php5 as well, please let me
know.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/27408

-- 
Edit this bug report at http://bugs.php.net/?id=27408&edit=1


Thread (8 messages)

« previous php.bugs (#56119) next »