PHP 5.2.3 segfault with syslog standard extension
| From: | Nir) | Date: | Wed, 14 Nov 2007 07:25:27 +0000 |
| Subject: | PHP 5.2.3 segfault with syslog standard extension | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-33118@lists.php.net to get a copy of this message | ||
Hi,
I am running PHP 5.2.3 as a statically compiled module for a web server
(appWeb, which is an embbeded apache-like server).
My platform is a ppc processor, running Windriver Linux.
The problem I encounter is, that when printing many syslogs to the
system my web-server crashes.
I have backtraced the problem to a specific call to a 'free' system call
in the syslog.c extension:
PHP_FUNCTION(openlog)
{
char *ident;
long option, facility;
int ident_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll", &ident,
&ident_len, &option, &facility) == FAILURE) {
return;
}
if (BG(syslog_device)) {
free(BG(syslog_device));
}
BG(syslog_device) = zend_strndup(ident, ident_len);
openlog(BG(syslog_device), option, facility); RETURN_TRUE; }
has anyone run into a same problem... or have any ideas as to how to
resolve this?
Thanks in advance,
Nir.