php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27543 php as cgi with extenstion=overload.so in php.ini crashes
Submitted: 2004-03-09 18:35 UTC Modified: 2004-03-09 21:05 UTC
From: arekm at pld-linux dot org Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.5RC3 OS: Linux 2.4/2.6 glibc 2.3.3
Private report: No CVE-ID: None
 [2004-03-09 18:35 UTC] arekm at pld-linux dot org
Description:
------------
[misiek@arm ~]$ php
Content-type: text/html
X-Powered-By: PHP/4.3.5RC3

(press ctrl+d)
zsh: segmentation fault  php

php in cgi mode segfaults when extension=overload.so in php.ini. removing this extensions causes that segfault no longer happens.

Almost every of my extensions is as loadable module but at this time I'm loading overload.so only.


   Content-type: text/html X-Powered-By: PHP/4.3.5RC3

   [1]PHP Logo 

PHP Version 4.3.5RC3

   System Linux arm.t19.ds.pwr.wroc.pl 2.6.4 #1 Fri Mar 5 16:14:32 CET
   2004 i686
   Build Date Mar 9 2004 01:39:56
   Configure Command './configure' 'LDFLAGS=-s' 'CFLAGS=-O2 -march=athlon
   -DEAPI=1     -I/usr/X11R6/include'     'CXXFLAGS=-O2    -march=athlon'
   'FFLAGS=-O2   -march=athlon'   'CPPFLAGS='   'CC=athlon-pld-linux-gcc'
   'CXX=athlon-pld-linux-g++'  '--build=athlon-pld-linux' '--prefix=/usr'
   '--exec-prefix=/usr'     '--bindir=/usr/bin'     '--sbindir=/usr/sbin'
   '--sysconfdir=/etc/php'                         '--datadir=/usr/share'
   '--includedir=/usr/include'                        '--libdir=/usr/lib'
   '--libexecdir=/usr/lib'                         '--localstatedir=/var'
   '--sharedstatedir=/var/lib'                  '--mandir=/usr/share/man'
   '--infodir=/usr/share/info'             '--x-libraries=/usr/X11R6/lib'
   '--with-apxs2=/usr/sbin/apxs'       '--with-config-file-path=/etc/php'
   '--with-exec-dir=/usr/bin'  '--disable-debug'  '--enable-memory-limit'
   '--enable-bcmath=shared'                    '--enable-calendar=shared'
   '--enable-ctype=shared'   '--enable-dba=shared'  '--enable-dbx=shared'
   '--enable-dio=shared'   '--enable-exif=shared'   '--enable-ftp=shared'
   '--enable-filepro=shared'                     '--enable-gd-native-ttf'
   '--enable-magic-quotes'                 '--enable-mbstring=shared,all'
   '--enable-mbregex'  '--enable-overload=shared' '--enable-pcntl=shared'
   '--enable-posix=shared'      '--enable-session'      '--enable-shared'
   '--enable-shmop=shared'                      '--enable-sysvmsg=shared'
   '--enable-sysvsem=shared'                    '--enable-sysvshm=shared'
   '--enable-track-vars'     '--enable-trans-sid'    '--enable-safe-mode'
   '--enable-sockets=shared'                     '--enable-ucd-snmp-hack'
   '--enable-wddx=shared'   '--enable-xml=shared'  '--enable-xslt=shared'
   '--enable-yp=shared'    '--with-bz2=shared'    '--with-cpdflib=shared'
   '--with-crack=shared'      '--with-curl=shared'     '--with-db=shared'
   '--with-db4'         '--with-dbase=shared'         '--with-dom=shared'
   '--with-dom-xslt=shared'                     '--with-dom-exslt=shared'
   '--with-expat-dir=shared,/usr'                 '--with-fribidi=shared'
   '--with-iconv=shared'                          '--with-filepro=shared'
   '--with-freetype-dir=shared'                   '--with-gettext=shared'
   '--with-gd=shared,/usr'        '--with-gdbm'       '--with-gmp=shared'
   '--with-hyperwave=shared'    '--with-imap=shared'    '--with-imap-ssl'
   '--with-interbase=shared,/usr'           '--with-jpeg-dir=shared,/usr'
   '--with-ldap=shared'  '--with-mcal=shared,/usr' '--with-mcrypt=shared'
   '--with-mhash=shared'
   '--with-mime-magic=shared,/usr/share/file/magic.mime'
   '--with-ming=shared'                  '--with-mnogosearch=shared,/usr'
   '--with-msession=shared'                         '--with-mssql=shared'
   '--with-mysql=shared,/usr'
   '--with-mysql-sock=/var/lib/mysql/mysql.sock'  '--with-ncurses=shared'
   '--with-openssl'   '--with-pcre-regex=shared'   '--with-pdflib=shared'
   '--with-pear=/usr/share/pear'               '--with-pgsql=shared,/usr'
   '--with-png-dir=shared,/usr'                    '--with-pspell=shared'
   '--with-readline=shared'    '--with-regex=php'   '--with-qtdom=shared'
   '--without-sablot-js' '--with-snmp=shared'
   '--with-sybase-ct=shared,/usr'             '--with-sybase=shared,/usr'
   '--with-t1lib=shared'                    '--with-tiff-dir=shared,/usr'
   '--with-unixODBC=shared'                   '--with-xmlrpc=shared,/usr'
   '--with-xslt-sablot=shared'   '--with-yaz=shared'  '--with-zip=shared'
   '--with-zlib=shared' '--with-zlib-dir=shared,/usr'
   Server API CGI
   Virtual Directory Support enabled
   Configuration File (php.ini) Path /etc/php/php-cgi.ini
   PHP API 20020918
   PHP Extension 20020429
   Zend Extension 20021010
   Debug Build no
   Thread Safety enabled
   Registered PHP Streams php, http, ftp, https, ftps
   [2]Zend logo This program makes use of the Zend Scripting Language
   Engine:
   Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
   [3]PLD logo This server is using PLD Linux.
   More information at [4]http://www.pld-linux.org/.
     _________________________________________________________________

[5]PHP Credits
     _________________________________________________________________

Configuration

PHP Core

             Directive                 Local Value          Master Value
   allow_call_time_pass_reference On                    On
   allow_url_fopen                On                    On
   always_populate_raw_post_data  Off                   Off
   arg_separator.input            &                     &
   arg_separator.output           &                     &
   asp_tags                       Off                   Off
   auto_append_file               no value              no value
   auto_prepend_file              no value              no value
   browscap                       no value              no value
   default_charset                no value              no value
   default_mimetype               text/html             text/html
   define_syslog_variables        Off                   Off
   disable_classes                no value              no value
   disable_functions              no value              no value
   display_errors                 On                    On
   display_startup_errors         Off                   Off
   doc_root                       no value              no value
   docref_ext                     no value              no value
   docref_root                    no value              no value
   enable_dl                      On                    On
   error_append_string            no value              no value
   error_log                      no value              no value
   error_prepend_string           no value              no value
   error_reporting                2039                  2039
   expose_php                     On                    On
   extension_dir                  /usr/lib/php          /usr/lib/php
   file_uploads                   On                    On
   gpc_order                      GPC                   GPC
   highlight.bg                   #FFFFFF               #FFFFFF
   highlight.comment              #FF8000               #FF8000
   highlight.default              #0000BB               #0000BB
   highlight.html                 #000000               #000000
   highlight.keyword              #007700               #007700
   highlight.string               #DD0000               #DD0000
   html_errors                    On                    On
   ignore_repeated_errors         Off                   Off
   ignore_repeated_source         Off                   Off
   ignore_user_abort              Off                   Off
   implicit_flush                 Off                   Off
   include_path                   .:/usr/share/pear     .:/usr/share/pear
   log_errors                     Off                   Off
   log_errors_max_len             1024                  1024
   magic_quotes_gpc               On                    On
   magic_quotes_runtime           Off                   Off
   magic_quotes_sybase            Off                   Off
   max_execution_time             180                   180
   max_input_time                 -1                    -1
   memory_limit                   8388608               8388608
   open_basedir                   no value              no value
   output_buffering               no value              no value
   output_handler                 no value              no value
   post_max_size                  8M                    8M
   precision                      14                    14
   register_argc_argv             On                    On
   register_globals               On                    On
   report_memleaks                On                    On
   safe_mode                      Off                   Off
   safe_mode_exec_dir             no value              no value
   safe_mode_gid                  Off                   Off
   safe_mode_include_dir          no value              no value
   sendmail_from                  me@localhost.com      me@localhost.com
   sendmail_path                  /usr/sbin/sendmail -t /usr/sbin/sendmail -t
   serialize_precision            100                   100
   short_open_tag                 On                    On
   SMTP                           localhost             localhost
   smtp_port                      25                    25
   sql.safe_mode                  Off                   Off
   track_errors                   Off                   Off
   unserialize_callback_func      no value              no value
   upload_max_filesize            2097152               2097152
   upload_tmp_dir                 no value              no value
   user_dir                       no value              no value
   variables_order                EGPCS                 EGPCS
   xmlrpc_error_number            0                     0
   xmlrpc_errors                  Off                   Off
   y2k_compliance                 Off                   Off

openssl

   OpenSSL support enabled
   OpenSSL Version OpenSSL 0.9.7c 30 Sep 2003

overload

   User-Space Object Overloading Support enabled

session

   Session Support          enabled
   Registered save handlers files user
           Directive         Local Value Master Value
   session.auto_start        Off         Off
   session.bug_compat_42     On          On
   session.bug_compat_warn   On          On
   session.cache_expire      180         180
   session.cache_limiter     nocache     nocache
   session.cookie_domain     no value    no value
   session.cookie_lifetime   0           0
   session.cookie_path       /           /
   session.cookie_secure     Off         Off
   session.entropy_file      no value    no value
   session.entropy_length    0           0
   session.gc_divisor        100         100
   session.gc_maxlifetime    1440        1440
   session.gc_probability    1           1
   session.name              PHPSESSID   PHPSESSID
   session.referer_check     no value    no value
   session.save_handler      files       files
   session.save_path         /tmp        /tmp
   session.serialize_handler php         php
   session.use_cookies       On          On
   session.use_only_cookies  Off         Off
   session.use_trans_sid     Off         Off

standard

   Regex Library           Bundled library enabled
   Dynamic Library Support enabled
   Path to sendmail        /usr/sbin/sendmail -t
   Directive Local Value Master Value
   assert.active 1 1
   assert.bail 0 0
   assert.callback no value no value
   assert.quiet_eval 0 0
   assert.warning 1 1
   auto_detect_line_endings 0 0
   default_socket_timeout 60 60
   safe_mode_allowed_env_vars PHP_ PHP_
   safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
   url_rewriter.tags           a=href,area=href,frame=src,form=,fieldset=
   a=href,area=href,frame=src,form=,fieldset=
   user_agent no value no value

tokenizer

   Tokenizer Support enabled

Additional Modules

   Module Name

Environment

         Variable                             Value
   _                    /usr/bin/php
   EDITOR               vim
   PATH
   /sbin:/usr/sbin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/sbin:/usr/l
   ocal/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/users/misiek/bin
   HISTFILE             /home/users/misiek/.historyz
   SHELL                /bin/zsh
   HOSTNAME             arm.t19.ds.pwr.wroc.pl
   USER                 misiek
   TMPDIR               /home/users/misiek/tmp
   OLDPWD               /home/users/misiek/rpm/SOURCES
   XAUTHORITY           /home/users/misiek/.Xauthority
   TERM                 xterm-color
   LANG                 pl_PL
   LOGNAME              misiek
   LS_COLORS
   no=00:fi=00:di=01;34:ln=01;36:pi=33:so=01;35:bd=01;33:cd=01;33:or=01;0
   5;37;41:mi=01;05;37;41:ex=32:*.sh=01;32:*.csh=01;32:*.bat=01;32:*.btm=
   01;32:*.cmd=01;32:*.com=01;32:*.exe=01;32:*.arj=01;31:*.bz=01;31:*.bz2
   =01;31:*.cpio=01;31:*.deb=01;31:*.gz=01;31:*.img=01;31:*.lha=01;31:*.l
   zh=01;31:*.rar=01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tgz=01;31:*
   .tpz=01;31:*.trpm=01;31:*.tz=01;31:*.z=01;31:*.Z=01;31:*.zip=01;31:*.z
   oo=01;31:*.bmp=01;35:*.cdr=01;35:*.gif=01;35:*.jpeg=01;35:*.jpg=01;35:
   *.mng=01;35:*.pbm=01;35:*.pcx=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;3
   5:*.tga=01;35:*.tif=01;35:*.tiff=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=0
   1;35:*.asf=01;37:*.asx=01;37:*.au=01;37:*.avi=01;37:*.m1v=01;37:*.mid=
   01;37:*.mp3=01;37:*.mp4=01;37:*.mpg=01;37:*.mpe=01;37:*.mpeg=01;37:*.m
   od=01;37:*.mov=01;37:*.ogg=01;37:*.qt=01;37:*.rm=01;37:*.ram=01;37:*.s
   3m=01;37:*.vob=01;37:*.voc=01;37:*.wav=01;37:*.wma=01;37:*.wmv=01;37:*
   .xm=01;37:*.abw=36:*.css=36:*.doc=36:*.dot=36:*.dvi=36:*.eps=36:*.htm=
   36:*.html=36:*.info=36:*.kpr=36:*.me=36:*.ms=36:*.ps=36:*.pdf=36:*.pps
   =36:*.ppt=36:*.rtf=36:*.sxc=36:*.sxw=36:*.tex=36:*.texi=36:*.texinfo=3
   6:*.txt=36:*.wri=36:*.xls=36:*.xlw=36:*.ac=01;33:*.am=01;33:*.c=01;33:
   *.cc=01;33:*.cpp=01;33:*.diff=01;33:*.f=01;33:*.h=01;33:*.in=01;33:*.o
   =01;33:*.patch=01;33:*.po=01;33:*.pot=01;33:*.s=01;33:*.spec=01;33:
   PS1                  [%n@%m %~]%(!.#.%\$)
   HISTFILESIZE         1000
   MINICOM              -L -c on
   MAIL                 /home/users/misiek/Mail/Poczta/
   HOME                 /home/users/misiek
   DISPLAY              :0.0
   HISTSIZE             500
   PWD                  /home/users/misiek
   LESSOPEN             |lesspipe.sh %s
   SHLVL                2
   PS2                  %_>
   GS_LIB               /home/users/misiek/.fonts
   KDE_FULL_SESSION     true
   GTK_RC_FILES
   /etc/gtk/gtkrc:/home/users/misiek/.gtkrc:/home/users/misiek/.kde/share
   /config/gtkrc
   GTK2_RC_FILES
   /etc/gtk-2.0/gtkrc:/home/users/misiek/.gtkrc-2.0:/home/users/misiek/.k
   de/share/config/gtkrc
   KDE_MULTIHEAD        false
   XCURSOR_THEME        default
   XCURSOR_SIZE         no value
   SESSION_MANAGER      local/arm.t19.ds.pwr.wroc.pl:/tmp/.ICE-unix/5188
   COLORTERM            no value
   KONSOLE_DCOP         DCOPRef(konsole-21655,konsole)
   KONSOLE_DCOP_SESSION DCOPRef(konsole-21655,session-2)
   WINDOWID             50331653

PHP Variables

              Variable                          Value
   PHP_SELF                        no value
   _SERVER["_"]                    /usr/bin/php
   _SERVER["EDITOR"]               vim
   _SERVER["PATH"]
   /sbin:/usr/sbin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/sbin:/usr/l
   ocal/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/users/misiek/bin
   _SERVER["HISTFILE"]             /home/users/misiek/.historyz
   _SERVER["SHELL"]                /bin/zsh
   _SERVER["HOSTNAME"]             arm.t19.ds.pwr.wroc.pl
   _SERVER["USER"]                 misiek
   _SERVER["TMPDIR"]               /home/users/misiek/tmp
   _SERVER["OLDPWD"]               /home/users/misiek/rpm/SOURCES
   _SERVER["XAUTHORITY"]           /home/users/misiek/.Xauthority
   _SERVER["TERM"]                 xterm-color
   _SERVER["LANG"]                 pl_PL
   _SERVER["LOGNAME"]              misiek
   _SERVER["LS_COLORS"]
   no=00:fi=00:di=01;34:ln=01;36:pi=33:so=01;35:bd=01;33:cd=01;33:or=01;0
   5;37;41:mi=01;05;37;41:ex=32:*.sh=01;32:*.csh=01;32:*.bat=01;32:*.btm=
   01;32:*.cmd=01;32:*.com=01;32:*.exe=01;32:*.arj=01;31:*.bz=01;31:*.bz2
   =01;31:*.cpio=01;31:*.deb=01;31:*.gz=01;31:*.img=01;31:*.lha=01;31:*.l
   zh=01;31:*.rar=01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tgz=01;31:*
   .tpz=01;31:*.trpm=01;31:*.tz=01;31:*.z=01;31:*.Z=01;31:*.zip=01;31:*.z
   oo=01;31:*.bmp=01;35:*.cdr=01;35:*.gif=01;35:*.jpeg=01;35:*.jpg=01;35:
   *.mng=01;35:*.pbm=01;35:*.pcx=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;3
   5:*.tga=01;35:*.tif=01;35:*.tiff=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=0
   1;35:*.asf=01;37:*.asx=01;37:*.au=01;37:*.avi=01;37:*.m1v=01;37:*.mid=
   01;37:*.mp3=01;37:*.mp4=01;37:*.mpg=01;37:*.mpe=01;37:*.mpeg=01;37:*.m
   od=01;37:*.mov=01;37:*.ogg=01;37:*.qt=01;37:*.rm=01;37:*.ram=01;37:*.s
   3m=01;37:*.vob=01;37:*.voc=01;37:*.wav=01;37:*.wma=01;37:*.wmv=01;37:*
   .xm=01;37:*.abw=36:*.css=36:*.doc=36:*.dot=36:*.dvi=36:*.eps=36:*.htm=
   36:*.html=36:*.info=36:*.kpr=36:*.me=36:*.ms=36:*.ps=36:*.pdf=36:*.pps
   =36:*.ppt=36:*.rtf=36:*.sxc=36:*.sxw=36:*.tex=36:*.texi=36:*.texinfo=3
   6:*.txt=36:*.wri=36:*.xls=36:*.xlw=36:*.ac=01;33:*.am=01;33:*.c=01;33:
   *.cc=01;33:*.cpp=01;33:*.diff=01;33:*.f=01;33:*.h=01;33:*.in=01;33:*.o
   =01;33:*.patch=01;33:*.po=01;33:*.pot=01;33:*.s=01;33:*.spec=01;33:
   _SERVER["PS1"]                  [%n@%m %~]%(!.#.%\\$)
   _SERVER["HISTFILESIZE"]         1000
   _SERVER["MINICOM"]              -L -c on
   _SERVER["MAIL"]                 /home/users/misiek/Mail/Poczta/
   _SERVER["HOME"]                 /home/users/misiek
   _SERVER["DISPLAY"]              :0.0
   _SERVER["HISTSIZE"]             500
   _SERVER["PWD"]                  /home/users/misiek
   _SERVER["LESSOPEN"]             |lesspipe.sh %s
   _SERVER["SHLVL"]                2
   _SERVER["PS2"]                  %_>
   _SERVER["GS_LIB"]               /home/users/misiek/.fonts
   _SERVER["KDE_FULL_SESSION"]     true
   _SERVER["GTK_RC_FILES"]
   /etc/gtk/gtkrc:/home/users/misiek/.gtkrc:/home/users/misiek/.kde/share
   /config/gtkrc
   _SERVER["GTK2_RC_FILES"]
   /etc/gtk-2.0/gtkrc:/home/users/misiek/.gtkrc-2.0:/home/users/misiek/.k
   de/share/config/gtkrc
   _SERVER["KDE_MULTIHEAD"]        false
   _SERVER["XCURSOR_THEME"]        default
   _SERVER["XCURSOR_SIZE"]         no value
   _SERVER["SESSION_MANAGER"]     
   local/arm.t19.ds.pwr.wroc.pl:/tmp/.ICE-unix/5188
   _SERVER["COLORTERM"]            no value
   _SERVER["KONSOLE_DCOP"]         DCOPRef(konsole-21655,konsole)
   _SERVER["KONSOLE_DCOP_SESSION"] DCOPRef(konsole-21655,session-2)
   _SERVER["WINDOWID"]             50331653
   _SERVER["PHP_SELF"]             no value
   _SERVER["argv"]
Array
(
)

   _SERVER["argc"]                 0
   _ENV["_"]                       /usr/bin/php
   _ENV["EDITOR"]                  vim
   _ENV["PATH"]
   /sbin:/usr/sbin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/sbin:/usr/l
   ocal/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/users/misiek/bin
   _ENV["HISTFILE"]                /home/users/misiek/.historyz
   _ENV["SHELL"]                   /bin/zsh
   _ENV["HOSTNAME"]                arm.t19.ds.pwr.wroc.pl
   _ENV["USER"]                    misiek
   _ENV["TMPDIR"]                  /home/users/misiek/tmp
   _ENV["OLDPWD"]                  /home/users/misiek/rpm/SOURCES
   _ENV["XAUTHORITY"]              /home/users/misiek/.Xauthority
   _ENV["TERM"]                    xterm-color
   _ENV["LANG"]                    pl_PL
   _ENV["LOGNAME"]                 misiek
   _ENV["LS_COLORS"]
   no=00:fi=00:di=01;34:ln=01;36:pi=33:so=01;35:bd=01;33:cd=01;33:or=01;0
   5;37;41:mi=01;05;37;41:ex=32:*.sh=01;32:*.csh=01;32:*.bat=01;32:*.btm=
   01;32:*.cmd=01;32:*.com=01;32:*.exe=01;32:*.arj=01;31:*.bz=01;31:*.bz2
   =01;31:*.cpio=01;31:*.deb=01;31:*.gz=01;31:*.img=01;31:*.lha=01;31:*.l
   zh=01;31:*.rar=01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tgz=01;31:*
   .tpz=01;31:*.trpm=01;31:*.tz=01;31:*.z=01;31:*.Z=01;31:*.zip=01;31:*.z
   oo=01;31:*.bmp=01;35:*.cdr=01;35:*.gif=01;35:*.jpeg=01;35:*.jpg=01;35:
   *.mng=01;35:*.pbm=01;35:*.pcx=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;3
   5:*.tga=01;35:*.tif=01;35:*.tiff=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=0
   1;35:*.asf=01;37:*.asx=01;37:*.au=01;37:*.avi=01;37:*.m1v=01;37:*.mid=
   01;37:*.mp3=01;37:*.mp4=01;37:*.mpg=01;37:*.mpe=01;37:*.mpeg=01;37:*.m
   od=01;37:*.mov=01;37:*.ogg=01;37:*.qt=01;37:*.rm=01;37:*.ram=01;37:*.s
   3m=01;37:*.vob=01;37:*.voc=01;37:*.wav=01;37:*.wma=01;37:*.wmv=01;37:*
   .xm=01;37:*.abw=36:*.css=36:*.doc=36:*.dot=36:*.dvi=36:*.eps=36:*.htm=
   36:*.html=36:*.info=36:*.kpr=36:*.me=36:*.ms=36:*.ps=36:*.pdf=36:*.pps
   =36:*.ppt=36:*.rtf=36:*.sxc=36:*.sxw=36:*.tex=36:*.texi=36:*.texinfo=3
   6:*.txt=36:*.wri=36:*.xls=36:*.xlw=36:*.ac=01;33:*.am=01;33:*.c=01;33:
   *.cc=01;33:*.cpp=01;33:*.diff=01;33:*.f=01;33:*.h=01;33:*.in=01;33:*.o
   =01;33:*.patch=01;33:*.po=01;33:*.pot=01;33:*.s=01;33:*.spec=01;33:
   _ENV["PS1"]                     [%n@%m %~]%(!.#.%\\$)
   _ENV["HISTFILESIZE"]            1000
   _ENV["MINICOM"]                 -L -c on
   _ENV["MAIL"]                    /home/users/misiek/Mail/Poczta/
   _ENV["HOME"]                    /home/users/misiek
   _ENV["DISPLAY"]                 :0.0
   _ENV["HISTSIZE"]                500
   _ENV["PWD"]                     /home/users/misiek
   _ENV["LESSOPEN"]                |lesspipe.sh %s
   _ENV["SHLVL"]                   2
   _ENV["PS2"]                     %_>
   _ENV["GS_LIB"]                  /home/users/misiek/.fonts
   _ENV["KDE_FULL_SESSION"]        true
   _ENV["GTK_RC_FILES"]
   /etc/gtk/gtkrc:/home/users/misiek/.gtkrc:/home/users/misiek/.kde/share
   /config/gtkrc
   _ENV["GTK2_RC_FILES"]
   /etc/gtk-2.0/gtkrc:/home/users/misiek/.gtkrc-2.0:/home/users/misiek/.k
   de/share/config/gtkrc
   _ENV["KDE_MULTIHEAD"]           false
   _ENV["XCURSOR_THEME"]           default
   _ENV["XCURSOR_SIZE"]            no value
   _ENV["SESSION_MANAGER"]        
   local/arm.t19.ds.pwr.wroc.pl:/tmp/.ICE-unix/5188
   _ENV["COLORTERM"]               no value
   _ENV["KONSOLE_DCOP"]            DCOPRef(konsole-21655,konsole)
   _ENV["KONSOLE_DCOP_SESSION"]    DCOPRef(konsole-21655,session-2)
   _ENV["WINDOWID"]                50331653

PHP License

   This program is free software; you can redistribute it and/or modify
   it under the terms of the PHP License as published by the PHP Group
   and included in the distribution in the file: LICENSE

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

   If you did not receive a copy of the PHP license, or have any
   questions about PHP licensing, please contact license@php.net.



Reproduce code:
---------------
just run php as cgi from shell and press ctrl+d (of course extenstion=overload.so has to be loaded).

Expected result:
----------------
Not segfault.

Actual result:
--------------
Segfault.
(gdb) r
Starting program: /home/users/misiek/rpm/BUILD/php-4.3.5RC3/sapi/cgi/.libs/php
Content-type: text/html
X-Powered-By: PHP/4.3.5RC3

/home/users/misiek/rpm/BUILD/php-4.3.5RC3/main/fopen_wrappers.c(556) :  Freeing 0x08058CF8 (17 bytes), script=-

Program received signal SIGSEGV, Segmentation fault.
0x4050f343 in ?? ()
(gdb) bt
#0  0x4050f343 in ?? ()
#1  0x400c64da in tsrm_shutdown () at /home/users/misiek/rpm/BUILD/php-4.3.5RC3/TSRM/TSRM.c:162
#2  0x0804c78e in main (argc=1, argv=0xbffff3f4)
    at /home/users/misiek/rpm/BUILD/php-4.3.5RC3/sapi/cgi/cgi_main.c:1687
(gdb) info threads
(gdb) frame 1
#1  0x400c64da in tsrm_shutdown () at /home/users/misiek/rpm/BUILD/php-4.3.5RC3/TSRM/TSRM.c:162
162                                                     resource_types_table[j].dtor(p->storage[j], &p->storage);
(gdb) print j
$1 = 17
(gdb) print p
$2 = (tsrm_tls_entry *) 0x804f118
(gdb) print *p
$3 = {storage = 0x80767e8, count = 18, thread_id = 16384, next = 0x0}
(gdb) print p->storage[j]
$4 = (void *) 0x8076838
(gdb) print resource_types_table[j]
$5 = {size = 44, ctor = 0x4050f2fe, dtor = 0x4050f343}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-09 18:56 UTC] sniper@php.net
Thank you for all the irrelevant information..(you obviously ignored the instructions about how to report)

Necessary information would only have been:

1. your configure line
2. gdb backtrace
3. Steps how to reproduce

Furthermore: Your configure line seems a bit weird since 
you certainly CAN NOT get a CGI binary with it. You didn't use clean sources when you configured the binary. 

Get the latest stable snapshot and drop ALL those LDFLAGS / CFLAGS etc., don't try outsmarting the configure..

Also, you should look into the './configure --help' output sometime, some of those options you used don't even exist.
And making PCRE extension shared is not very good idea either..

Bogus. (open a better report with the above mentioned information if you still can reproduce the crash with clean sources from latest STABLE snapshot using proper configure line..)

 [2004-03-09 21:05 UTC] arekm at pld-linux dot org
Sorry for too much data.

Unfortunately I wasn't able to reproduce this with simple compilation of vanilla php.

Yes, the sources have few patches (mailny am/ac things like enabling build of some modules as shared ones).

The problem is probably related to fact that we have different php binaries/modules like cgi, fastcgi, cli, apache2 sapi module using exactly the same ext modules (built as .so objects) to avoid having too many duplicates.

Setting CFLAGS, LDFLAGS isn't any outsmarting configure. configure itself can't find out what compiler optimizations I want. That's why CFLAGS/LDFLAGS exists.

Also using not existing options to configure doesn't make any difference. They are ignored after all.

What's wrong with shared PCRE?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 13:01:33 2025 UTC