php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27629 crashes with illegal instruction
Submitted: 2004-03-17 19:45 UTC Modified: 2004-03-18 16:56 UTC
From: sroussey at network54 dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.3.5RC3 OS: Linux 2.4.20
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sroussey at network54 dot com
New email:
PHP Version: OS:

 

 [2004-03-17 19:45 UTC] sroussey at network54 dot com
Description:
------------
PHP 4.3.5RC3 crashes with illegal instruction

Reproduce code:
---------------
CC=gcc CFLAGS="-O3 -march=$CPU  " CXX=gcc \
./configure \
--with-mysql=/usr \
--with-gd \
--with-dom \
--with-zlib \
--with-xml \
--with-openssl=/usr/local/ssl \
--with-apache=../apache-1.3.29\
--enable-inline-optimization \
--enable-shmop \
--enable-memory-limit
make
make install

Expected result:
----------------
noraml installation...

Actual result:
--------------
Installing PHP SAPI module:       apache
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/man/man1/
Installing PEAR environment:      /usr/local/lib/php/
make[1]: *** [install-pear-installer] Illegal instruction
make: *** [install-pear] Error 2

I can confirm that php crashes in the make when the php cli is used in install-pear-installer

Same config on php 4.3.4 has no issues.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-17 19:49 UTC] iliaa@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

set CFLAGS to -g, add --enable-debug to your configure and 
if it still crashes generate a backtrace. 
 [2004-03-17 20:19 UTC] sroussey at network54 dot com
The line in the Makefile gets expanded to this:

/root/webserver_software_tmp/php-4.3.5RC3/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0 /root/webserver_software_tmp/php-4.3.5RC3/pear/install-pear.php -d "/usr/local/lib/php" -b "/usr/local/bin" /root/webserver_software_tmp/php-4.3.5RC3/pear/package-*.xml

gdb on the above has a bt of:

Starting program: /root/webserver_software_tmp/php-4.3.5RC3/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0 /root/webserver_software_tmp/php-4.3.5RC3/pear/install-pear.php -d "/usr/local/lib/php" -b "/usr/local/bin" /root/webserver_software_tmp/php-4.3.5RC3/pear/package-*.xml

Program received signal SIGILL, Illegal instruction.
0x08160493 in sub_function ()
(gdb) bt
#0  0x08160493 in sub_function ()
#1  0x0816e7f2 in execute ()
#2  0x081711be in execute ()
#3  0x081711be in execute ()
#4  0x08164547 in zend_execute_scripts ()
#5  0x0813cf2e in php_execute_script ()
#6  0x08174801 in main ()
#7  0x42015967 in __libc_start_main () from /lib/i686/libc.so.6
 [2004-03-17 20:28 UTC] iliaa@php.net
What this backtrace generated with debug build of PHP? 
The backtrace should've been more detailed if it was. 
 [2004-03-17 20:28 UTC] sroussey at network54 dot com
Well, that was the backtrace before I did a debug version. When I changed the CFLAGS to add -g as you suggested and added --enable-debug then it no longer crashes.
 [2004-03-17 20:31 UTC] sroussey at network54 dot com
BTW: I have an strace (from the version that crashes -- that is, without the debug option)

# tail trace_file -n 50
lstat64("/root/webserver_software_tmp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3/pear", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3/pear/PEAR", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3/pear/PEAR/Registry.php", {st_mode=S_IFREG|0664, st_size=15079, ...}) = 0
open("/root/webserver_software_tmp/php-4.3.5RC3/pear/PEAR/Registry.php", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0664, st_size=15079, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0664, st_size=15079, ...}) = 0
lseek(3, 0, SEEK_CUR)                   = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "<?php\n//\n// +-------------------"..., 8192) = 8192
read(3, "        return $err;\n           "..., 8192) = 6887
brk(0)                                  = 0x847e000
brk(0x8482000)                          = 0x8482000
brk(0)                                  = 0x8482000
brk(0x8485000)                          = 0x8485000
brk(0)                                  = 0x8485000
brk(0x8487000)                          = 0x8487000
brk(0)                                  = 0x8487000
brk(0x8488000)                          = 0x8488000
read(3, "", 8192)                       = 0
close(3)                                = 0
stat64("/root/webserver_software_tmp/php-4.3.5RC3/pear/System.php", {st_mode=S_IFREG|0664, st_size=17972, ...}) = 0
getcwd("/root/webserver_software_tmp/php-4.3.5RC3", 4096) = 42
lstat64("/root", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3/pear", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3/pear/System.php", {st_mode=S_IFREG|0664, st_size=17972, ...}) = 0
open("/root/webserver_software_tmp/php-4.3.5RC3/pear/System.php", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0664, st_size=17972, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0664, st_size=17972, ...}) = 0
lseek(3, 0, SEEK_CUR)                   = 0
lseek(3, 0, SEEK_SET)                   = 0
close(3)                                = 0
stat64("/root/webserver_software_tmp/php-4.3.5RC3/pear/PEAR.php", {st_mode=S_IFREG|0664, st_size=29746, ...}) = 0
getcwd("/root/webserver_software_tmp/php-4.3.5RC3", 4096) = 42
lstat64("/root", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3/pear", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/root/webserver_software_tmp/php-4.3.5RC3/pear/PEAR.php", {st_mode=S_IFREG|0664, st_size=29746, ...}) = 0
open("/root/webserver_software_tmp/php-4.3.5RC3/pear/PEAR.php", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0664, st_size=29746, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0664, st_size=29746, ...}) = 0
lseek(3, 0, SEEK_CUR)                   = 0
lseek(3, 0, SEEK_SET)                   = 0
close(3)                                = 0
--- SIGILL (Illegal instruction) ---
+++ killed by SIGILL +++
 [2004-03-18 08:45 UTC] iliaa@php.net
Please generate a backtrace with a DEBUG version of PHP 
without heavy optimization flags. 
 [2004-03-18 16:56 UTC] sroussey at network54 dot com
Must have been a gcc issue. Restarted machine and unpacked a fresh tar.gz and it works fine. Soory to waste any time.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 14:01:28 2024 UTC