From:             druid at mail dot cz
Operating system: Linux 2.4.20
PHP version:      4.3.2
PHP Bug Type:     Reproducible crash
Bug description:  Segmentation fault on sapi_initialize_empty_request

Description:
------------
Php always crashes at start. I've tested it with sapi.
I've got the latest gcc and glibc:

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/usr --enable-shared
--enable-threads=posix --with-slibdir=/lib --enable-__cxa_atexit
--enable-clocale=gnu --enable-__vt_8iostream
Thread model: posix
gcc version 3.3

./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-zlib --enable-bcmath --with-bz2=shared --enable-calendar \
--enable-exif --enable-ftp --with-ttf --with-gettext \
--with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir \
--with-mysql --with-mysql-sock --with-recode=shared \
--with-imap --with-imap-ssl=/usr/local/ssl \
--enable-debug

glibc-2.3.2

Reproduce code:
---------------
SAPI_API void sapi_initialize_empty_request(TSRMLS_D)
{
        SG(server_context) = NULL;
        SG(request_info).request_method = NULL;
        SG(request_info).auth_user = SG(request_info).auth_password =
NULL;
        SG(request_info).content_type_dup = NULL;
}

The last line is the problem.

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
sapi_initialize_empty_request () at /usr/src/php-4.3.2/main/SAPI.c:437
437             SG(request_info).content_type_dup = NULL;
(gdb) bt
#0  sapi_initialize_empty_request () at
/usr/src/php-4.3.2/main/SAPI.c:437
#1  0x081841d7 in php_module_startup (sf=0x82e02e0,
    additional_modules=0x82e02e0, num_additional_modules=137240573)
    at /usr/src/php-4.3.2/main/main.c:1083
#2  0x6e690078 in ?? ()


-- 
Edit bug report at http://bugs.php.net/?id=24576&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24576&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24576&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24576&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24576&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24576&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24576&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24576&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24576&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24576&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24576&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24576&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24576&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24576&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24576&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24576&r=gnused

Reply via email to