php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21718 Segfault on pear installer script
Submitted: 2003-01-17 18:25 UTC Modified: 2003-02-03 06:52 UTC
From: spam at mattbergin dot co dot uk Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.3.0 OS: Slackware Linux 8.1
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: spam at mattbergin dot co dot uk
New email:
PHP Version: OS:

 

 [2003-01-17 18:25 UTC] spam at mattbergin dot co dot uk
Installed php-4.3.0 from source .tar.gz, then tried to install the 'Auth' pear package:

berg@baboon:~$ pear install Auth
downloading Auth-1.1.1.tgz ...
...done: 11,005 bytes
Segmentation fault (core dumped)

I think the crash occurs in the zlib compression functions.

Backtrace follows:

(gdb) bt
#0  0x08187fdf in inflate_codes ()
#1  0x08186eb3 in inflate_blocks ()
#2  0x08186046 in inflate ()
#3  0x08181ff7 in gzread ()
#4  0x0806d4db in php_gziop_read (stream=0x846e904,
    buf=0x847f424 "by Marko Karppinen, <karppinen@pobox.com>)\n\n* Added optional setLoginCallback() and setLogoutCallback() methods.\n  (Patch by Marko Karppinen, <karppinen@pobox.com>)\n\n* Added method setIdle"..., count=512) at /usr/local/src/php-4.3.0/ext/zlib/zlib_fopen_wrapper.c:36
#5  0x08147f53 in _php_stream_read (stream=0x846e904,
    buf=0x847f424 "by Marko Karppinen, <karppinen@pobox.com>)\n\n* Added optional setLoginCallback() and setLogoutCallback() methods.\n  (Patch by Marko Karppinen, <karppinen@pobox.com>)\n\n* Added method setIdle"..., size=512) at /usr/local/src/php-4.3.0/main/streams.c:589
#6  0x080e744c in zif_fread (ht=2, return_value=0x846fd2c, this_ptr=0x0, return_value_used=1) at /usr/local/src/php-4.3.0/ext/standard/file.c:2083
#7  0x08178693 in execute (op_array=0x83786b4) at /usr/local/src/php-4.3.0/Zend/zend_execute.c:1598
#8  0x0817880a in execute (op_array=0x835c22c) at /usr/local/src/php-4.3.0/Zend/zend_execute.c:1640
#9  0x0817880a in execute (op_array=0x836090c) at /usr/local/src/php-4.3.0/Zend/zend_execute.c:1640
#10 0x0817880a in execute (op_array=0x83c34f4) at /usr/local/src/php-4.3.0/Zend/zend_execute.c:1640
#11 0x0817880a in execute (op_array=0x83a8ac4) at /usr/local/src/php-4.3.0/Zend/zend_execute.c:1640
#12 0x0817880a in execute (op_array=0x83a465c) at /usr/local/src/php-4.3.0/Zend/zend_execute.c:1640
#13 0x0817880a in execute (op_array=0x826bfb4) at /usr/local/src/php-4.3.0/Zend/zend_execute.c:1640
#14 0x08166d9e in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php-4.3.0/Zend/zend.c:864
#15 0x0813fa8a in php_execute_script (primary_file=0xbffff828) at /usr/local/src/php-4.3.0/main/main.c:1573
#16 0x0818128c in main (argc=8, argv=0xbffff8a4) at /usr/local/src/php-4.3.0/sapi/cli/php_cli.c:746
#17 0x4020017d in __libc_start_main (main=0x81808dc <main>, argc=8, ubp_av=0xbffff8a4, init=0x80692fc <_init>, fini=0x8188b70 <_fini>,
    rtld_fini=0x4000a534 <_dl_fini>, stack_end=0xbffff89c) at ../sysdeps/generic/libc-start.c:129

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-18 06:36 UTC] spam at mattbergin dot co dot uk
Same again. Using zlib-1.1.4. Configure command was './configure' '--enable-sockets' '--with-pgsql' '--enable-pcntl' '--with-apxs' '--with-gd' '--with-zlib-dir=/usr/local/include/zlib' '--with-jpeg-dir' '--enable-exif' '--with-freetype-dir=/usr/local' '--with-dom=/usr/include/libxml2/libxml''--prefix=/usr/local/test'



#0  0x0818861f in inflate_codes ()
#1  0x081874f3 in inflate_blocks ()
#2  0x08186686 in inflate ()
#3  0x08182637 in gzread ()
#4  0x0806d60b in php_gziop_read (stream=0x846f4e4,
    buf=0x847ffdc "by Marko Karppinen, &lt;karppinen@pobox.com&gt;)\n\n* Added optional setLoginCallback() and setLogoutCallback() methods.\n  (Patch by Marko Karppinen, &lt;karppinen@pobox.com&gt;)\n\n* Added method setIdle"..., count=512)
    at /usr/local/src/php4-STABLE-200301181030/ext/zlib/zlib_fopen_wrapper.c:36
#5  0x081485b3 in _php_stream_read (stream=0x846f4e4,
    buf=0x847ffdc "by Marko Karppinen, &lt;karppinen@pobox.com&gt;)\n\n* Added optional setLoginCallback() and setLogoutCallback() methods.\n  (Patch by Marko Karppinen, &lt;karppinen@pobox.com&gt;)\n\n* Added method setIdle"..., size=512)
    at /usr/local/src/php4-STABLE-200301181030/main/streams.c:589
#6  0x080e765c in zif_fread (ht=2, return_value=0x8470974, this_ptr=0x0, return_value_used=1)
    at /usr/local/src/php4-STABLE-200301181030/ext/standard/file.c:2083
#7  0x08178ca3 in execute (op_array=0x83797e4) at /usr/local/src/php4-STABLE-200301181030/Zend/zend_execute.c:1598
#8  0x08178e1a in execute (op_array=0x836155c) at /usr/local/src/php4-STABLE-200301181030/Zend/zend_execute.c:1640
#9  0x08178e1a in execute (op_array=0x83608ac) at /usr/local/src/php4-STABLE-200301181030/Zend/zend_execute.c:1640
#10 0x08178e1a in execute (op_array=0x83c3f94) at /usr/local/src/php4-STABLE-200301181030/Zend/zend_execute.c:1640
#11 0x08178e1a in execute (op_array=0x83a9554) at /usr/local/src/php4-STABLE-200301181030/Zend/zend_execute.c:1640
#12 0x08178e1a in execute (op_array=0x839657c) at /usr/local/src/php4-STABLE-200301181030/Zend/zend_execute.c:1640
#13 0x08178e1a in execute (op_array=0x826cfb4) at /usr/local/src/php4-STABLE-200301181030/Zend/zend_execute.c:1640
#14 0x081673ae in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php4-STABLE-200301181030/Zend/zend.c:864
#15 0x0813ff1a in php_execute_script (primary_file=0xbffff828) at /usr/local/src/php4-STABLE-200301181030/main/main.c:1573
#16 0x081818cc in main (argc=8, argv=0xbffff8a4) at /usr/local/src/php4-STABLE-200301181030/sapi/cli/php_cli.c:753
#17 0x4020017d in __libc_start_main (main=0x8180eec <main>, argc=8, ubp_av=0xbffff8a4, init=0x8069424 <_init>, fini=0x81891b0 <_fini>,
    rtld_fini=0x4000a534 <_dl_fini>, stack_end=0xbffff89c) at ../sysdeps/generic/libc-start.c:129
 [2003-01-18 07:24 UTC] spam at mattbergin dot co dot uk
Does this help? I don't know much about debugging c++!

(gdb) frame 3
#3  0x08182637 in gzread ()
(gdb) l
31      static size_t php_gziop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
32      {
33              struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
34              int read;
35
36              read = gzread(self->gz_file, buf, count);
37
38              if (gzeof(self->gz_file))
39                      stream->eof = 1;
40
(gdb) p stream
$25 = (FILE *) 0x0
(gdb) up
#4  0x0806d60b in php_gziop_read (stream=0x846f1d4,
    buf=0x846f444 "package.xml", count=512)
    at /usr/local/src/php4-STABLE-200301181030/ext/zlib/zlib_fopen_wrapper.c:36
36              read = gzread(self->gz_file, buf, count);
(gdb) l
31      static size_t php_gziop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
32      {
33              struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *)stream->abstract;
34              int read;
35
36              read = gzread(self->gz_file, buf, count);
37
38              if (gzeof(self->gz_file))
39                      stream->eof = 1;
40
(gdb) p stream
$26 = (php_stream *) 0x846f1d4
(gdb) p *stream
$27 = {ops = 0x81bc280, abstract = 0x84702a4, filterhead = 0x0,
  filtertail = 0x0, wrapper = 0x0, wrapperthis = 0x0, wrapperdata = 0x0,
  fgetss_state = 0, is_persistent = 0, mode = "rb", '\0' <repeats 13 times>,
  rsrc_id = 65, in_free = 0, fclose_stdiocast = 0, stdiocast = 0x0,
  context = 0x0, flags = 2, position = 0, readbuf = 0x0, readbuflen = 0,
  readpos = 0, writepos = 0, chunk_size = 8192, eof = 0}
 [2003-02-03 06:52 UTC] spam at mattbergin dot co dot uk
Turns out my zlib library was broken
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 13:01:28 2024 UTC