ID: 24576
User updated by: druid at mail dot cz
Reported By: druid at mail dot cz
Status: Open
Bug Type: Reproducible crash
Operating System: Linux 2.4.20
PHP Version: 4.3.2
New Comment:
I tried php-5b1 and it is nearly the same, except the gdb output:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 22382)]
0x081b1e50 in sapi_initialize_empty_request ()
(gdb) bt
#0 0x081b1e50 in sapi_initialize_empty_request ()
#1 0x081ac114 in php_module_startup ()
#2 0x40395ca6 in __libc_start_main () from /lib/libc.so.6
Previous Comments:
------------------------------------------------------------------------
[2003-07-10 02:34:58] druid at mail dot cz
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 this bug report at http://bugs.php.net/?id=24576&edit=1