php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17791 Apache child dies calling xslt_process
Submitted: 2002-06-16 17:02 UTC Modified: 2002-07-02 20:03 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ochoto at diariolinux dot com Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 4.2.1 OS: Linux and Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ochoto at diariolinux dot com
New email:
PHP Version: OS:

 

 [2002-06-16 17:02 UTC] ochoto at diariolinux dot com
System:

Gentoo Linux 2.4.19

Apache 1.3.24
PHP 4.2.1
expat 1.95.2
sablotron 0.90
libwww 5.3.2  (libxmltok,libxmlparse)

PHP configure options:

 './configure' '--prefix=/usr' '--with-gd' '--with-gmp' '--with-bz2' '--with-ttf' '--enable-ftp' '--with-t1lib' '--enable-dbase' '--with-zlib=yes' '--enable-bcmath' '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar' '--enable-trans-sid' '--enable-safe-mode' '--enable-versioning' '--enable-track-vars' '--with-png-dir=/usr' '--with-jpeg-dir=/usr/lib' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs -ltiff' '--with-exec-dir=/usr/lib/apache/bin' '--with-config-file-path=/etc/php4' '--host=i686-pc-linux-gnu' '--without-readline' '--with-pam' '--with-openssl' '--with-gdbm=/usr' '--with-db3=/usr' '--with-mysql=/usr' '--with-unixODBC=/usr' '--with-ldap' '--with-pdflib=/usr' '--with-xml' '--with-sablot=/usr' '--enable-xslt' '--with-xslt-sablot' '--with-dom' '--with-mcrypt' '--with-mhash' '--with-xpm-dir=/usr/X11R6'


Apache error log:
[Sun Jun 16 22:39:55 2002] [notice] child pid 14976 exit signal Segmentation fault (11)

The same xml and xsl running through sabcmd works ok.

Related:
http://archive.gingerall.cz/archives/public/sablot2002/msg00252.html
http://archive.gingerall.cz/archives/public/sablot2002/msg00254.html

Backtrace:
-----------
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x40720bd9 in Situation::generateMessage () from /usr/lib/libsablot.so.0
(gdb) bt
#0  0x40720bd9 in Situation::generateMessage () from /usr/lib/libsablot.so.0
#1  0x0a3e656c in ?? ()
Cannot access memory at address 0x7469742f
(gdb)

PHP Code:

<h1>Noticias</h1>
<?php

$xmlFile = "news.xml";
$xslFile = "pcnews.xsl";

// Crear un nuevo identificador de XSLT
$th = xslt_create() or die("Error al crear el identificador de XSLT!");
xslt_set_log($th,'/tmp/xslt.log');

// Abrir los ficheros XML y XSL
$xh = fopen($xmlFile, "r") or die("No se pudo abrir el fichero XML");
$sh = fopen($xslFile, "r") or die("No se pudo abrir el fichero XSL");

// Leer los contenidos de los ficheros XML y XSL
$xmlContent = fread($xh, filesize($xmlFile));
$xslContent = fread($sh, filesize($xslFile));

// Realizar la transformaci&#65533;n XSL
$XSLtransformation = xslt_process($th, $xslContent, $xmlContent) or xslt_error($th);


// Enviar la cabecera WAP correspondiente si es necesario
if ($xslFile == "wapnews") {
	header("content-type: text/vnd.wap.wml");
}

// Enviar el fichero XML transformado
echo $XSLtransformation;

// Liberamos los recursos
xslt_free($th);

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-02 17:37 UTC] msopacua at idg dot nl
Actually - this is a user error, but it shouldn't segfault.

The arguments should be filenames, not strings.
The fault is likely to be in the Sablotron source, since it doesn't count on filenames longer than 512(?) bytes.


You can reproduce the error with sabcmd, like so:
./sabcmd xxxxxxxxx y

where xxxxxxxx should be 512 or more.


Gingerall has been notified.
 [2002-07-02 20:03 UTC] sniper@php.net
Not a bug in PHP -> bogus.

 [2002-07-04 16:42 UTC] msopacua at idg dot nl
Confirmed: This bug has been fixed in the current CVS of Sablotron and will be incorporated in the next release.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Nov 15 12:01:34 2019 UTC