Edit report at http://bugs.php.net/bug.php?id=39418&edit=1

 ID:                 39418
 Comment by:         furcube at gmail dot com
 Reported by:        php at fiddaman dot net
 Summary:            ltrim() crash in _zval_ptr_dtor()
 Status:             Bogus
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Solaris 10
 PHP Version:        5.2.0
 Block user comment: N
 Private report:     N

 New Comment:

gcc -v

Using built-in specs.

Target: sparc-sun-solaris2.10

Configured with: ./configure --prefix=/usr/local -v
--enable-languages=c,c++ --enable-shared --with-system-zlib
--enable-threads=posix --enable-nls --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr
--enable-targets=all --enable-checking=release

Thread model: posix

gcc version 4.3.2 (GCC)



uname -a

SunOS sol 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V210



Building php-5.3.4



./configure --prefix=/usr/local/apache2 --with-zlib --with-xsl
--enable-zip --enable-soap --with-mysql=/usr/local/mysql
--with-pdo-mysql=/usr/local/mysql 





Generating phar.php

Segmentation Fault - core dumped

make: *** [ext/phar/phar.php] Error 139



pstack core.1292590431.php.1292590431

core 'core.1292590431.php.1292590431' of 18512:
/export/home/devel/php-5.3.4/sapi/cli/php -n -d open_basedir= -d outpu

 0030f1c8 _zval_ptr_dtor (ffbfef2c, 68be70, 0, 0, 1, 0) + 8

 0036933c zend_do_fcall_common_helper_SPEC (7e6710, 0, 648630, fffffff8,
18, 7e6d14) + 364

 00345e3c execute  (68b7d8, 68b790, 3b, 6798a8, 648ce8, 2) + 1e0

 0031b534 zend_execute_scripts (8, 6783dc, 3, 1, ffbff708, 68b790) + 70

 002ca2e8 php_execute_script (0, 64df50, ff5b1a91, fffffffd, 80808080,
1010101) + 16c

 003a5768 main     (3a57d4, 64e374, 0, 0, 0, 0) + 1330

 0004cc34 _start   (0, 0, 0, 0, 0, 0) + 5c



gdb -c core.1292590431.php.1292590431
/export/home/devel/php-5.3.4/sapi/cli/php

GNU gdb 6.8

Copyright (C) 2008 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"

and "show warranty" for details.

This GDB was configured as "sparc-sun-solaris2.10"...

Reading symbols from /usr/local/lib/libz.so...done.

Loaded symbols for /usr/local/lib/libz.so

Reading symbols from /usr/lib/libexslt.so.0...done.

Loaded symbols for /usr/lib/libexslt.so.0

Reading symbols from /lib/libresolv.so.2...done.

Loaded symbols for /lib/libresolv.so.2

Reading symbols from /lib/librt.so.1...done.

Loaded symbols for /lib/librt.so.1

Reading symbols from /usr/local/lib/libiconv.so.2...done.

Loaded symbols for /usr/local/lib/libiconv.so.2

Reading symbols from /lib/libm.so.2...done.

Loaded symbols for /lib/libm.so.2

Reading symbols from /lib/libnsl.so.1...done.

Loaded symbols for /lib/libnsl.so.1

Reading symbols from /lib/libsocket.so.1...done.

Loaded symbols for /lib/libsocket.so.1

Reading symbols from /usr/lib/libxml2.so.2...done.

Loaded symbols for /usr/lib/libxml2.so.2

Reading symbols from
/usr/local/mysql/lib/mysql/libmysqlclient.so.16...done.

Loaded symbols for /usr/local/mysql/lib/mysql/libmysqlclient.so.16

Reading symbols from /usr/lib/libxslt.so.1...done.

Loaded symbols for /usr/lib/libxslt.so.1

Reading symbols from /lib/libc.so.1...done.

Loaded symbols for /lib/libc.so.1

Reading symbols from /usr/local/lib/libgcc_s.so.1...done.

Loaded symbols for /usr/local/lib/libgcc_s.so.1

Reading symbols from /lib/libpthread.so.1...

warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074

done.

Loaded symbols for /lib/libpthread.so.1

Reading symbols from /lib/libaio.so.1...done.

Loaded symbols for /lib/libaio.so.1

Reading symbols from /lib/libmd.so.1...done.

Loaded symbols for /lib/libmd.so.1

Reading symbols from
/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1...done.

Loaded symbols for /platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1

Reading symbols from /lib/nss_files.so.1...done.

Loaded symbols for /lib/nss_files.so.1

Reading symbols from /lib/ld.so.1...done.

Loaded symbols for /lib/ld.so.1

Core was generated by `/export/home/devel/php-5.3.4/sapi/cli/php -n -d
open_basedir= -d output_bufferi'.

Program terminated with signal 11, Segmentation fault.

[New process 84048    ]

#0  _zval_ptr_dtor (zval_ptr=0xffbfef2c) at
/export/home/devel/php-5.3.4/Zend/zend.h:385

385             return --pz->refcount__gc;

(gdb) bt

#0  _zval_ptr_dtor (zval_ptr=0xffbfef2c) at
/export/home/devel/php-5.3.4/Zend/zend.h:385

#1  0x00369344 in zend_do_fcall_common_helper_SPEC
(execute_data=0x7e6710) at
/export/home/devel/php-5.3.4/Zend/zend_execute.h:318

#2  0x00345e44 in execute (op_array=0x68b7d8) at
/export/home/devel/php-5.3.4/Zend/zend_vm_execute.h:107

#3  0x0031b53c in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /export/home/devel/php-5.3.4/Zend/zend.c:1194

#4  0x002ca2f0 in php_execute_script (primary_file=0xffbff708) at
/export/home/devel/php-5.3.4/main/main.c:2265

#5  0x003a5770 in main (argc=13, argv=0xffbff82c) at
/export/home/devel/php-5.3.4/sapi/cli/php_cli.c:1193


Previous Comments:
------------------------------------------------------------------------
[2006-11-21 21:16:26] [email protected]

The problem seems to be caused by GCC 4.1.1, so it doesn't look like PHP
problem (PHP itself works perfectly fine with GCC4 on Linux, for
example).

Please reopen the report when/if you have any additional information. 

Thank you.

------------------------------------------------------------------------
[2006-11-16 16:12:19] [email protected]

This explains why I'm unable to reproduce it..

Well, I'm afraid you're most likely on your own with such exotic
platform and compiler version.

------------------------------------------------------------------------
[2006-11-16 16:07:18] php at fiddaman dot net

Can't reproduce the problem with gcc 3



# gcc -v

Reading specs from
/opt/GNUgcc3/lib/gcc/sparcv9-sun-solaris2.9/3.4.6/specs

Configured with: ../configure --prefix=/opt/GNUgcc3 --enable-languages=c
--disable-nls sparcv9-sun-solaris2.9

Thread model: posix

gcc version 3.4.6



# file sapi/cli/php

sapi/cli/php:   ELF 64-bit MSB executable SPARCV9 Version 1, dynamically
linked, not stripped

------------------------------------------------------------------------
[2006-11-16 10:23:41] [email protected]

Is there any chance to try to build PHP with GCC 3.x ?

------------------------------------------------------------------------
[2006-11-16 10:18:02] php at fiddaman dot net

Latest snapshot - no change, crashes in the same place.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=39418


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=39418&edit=1

Reply via email to