#47730 [Fbk-Opn]: PHP crashes when errorHandler throws Exception

2009-03-26 Thread berblinger at krumedia dot de
 ID:   47730
 User updated by:  berblinger at krumedia dot de
 Reported By:  berblinger at krumedia dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

I could manage to get you an account on a newly set up server,
configured with nothing else that debian 5.0, PHP 5.2.9 and no other
third party php extention for a maximum of 2 days on the upcoming
friday.

We just got two new servers at our computer center. Please tell me if
you can take a look at the weekend (friday till sunday maximum) and how
i should provide the account informations to you. Thanks in advance.


Previous Comments:


[2009-03-25 14:03:05] tombt081981 at hotmail dot com

This information might help:

I got the bug with php 5.2.9 and(!) php 5.2.6 after(!) an upgrade to
Bebian lenny 5.0. Before (debian 4) it worked fine, so this got to do
something with Debian 5 and not especially with php 5.2.9.



[2009-03-25 11:41:15] scott...@php.net

Can you do

./configure --disable-all --enable-debug

And run the script through valgrind as well as through gdb.

If that fails then getting access to an account on the server might be
the easiest solution.



[2009-03-25 11:32:49] berblinger at krumedia dot de

This segfault is also caused when any 3rd party modules are disabled.
As already said, we got several servers with very similar hardware and
OS ( including configuration ) and each of them makes PHP crash with
this snippet.

We recently upgraded from PHP 5.2.6 to PHP 5.2.9 and since this upgrade
we noticed this segfault.

Can i provide any other informations for you to help you fixing this
bug?



[2009-03-23 15:51:15] tombt081981 at hotmail dot com

I first just disabled XCache

= still seg fault , so XCache can't be the reason

Then i re-compiled with ./configure --disable-all

= still seg fault


# php -i
System = myhostname 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009
x86_64
Build Date = Mar 23 2009 16:43:14
Configure Command =  './configure'  '--disable-all'
Server API = Command Line Interface
Virtual Directory Support = disabled
Configuration File (php.ini) Path = /usr/local/lib
Loaded Configuration File = /usr/local/lib/php-cli.ini
Scan this dir for additional .ini files = (none)
additional .ini files parsed = (none)
PHP API = 20041225
PHP Extension = 20060613
Zend Extension = 220060519
Debug Build = no
Thread Safety = disabled
Zend Memory Manager = enabled
IPv6 Support = enabled
Registered PHP Streams = php, file, data, http, ftp
Registered Stream Socket Transports = tcp, udp, unix, udg
Registered Stream Filters = string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed

#...



[2009-03-23 15:27:39] scott...@php.net

I can't reproduce this with 5.2.9 / 5.2.10-dev, can you try a build
with everything disabled. Also make sure all third party modules are
disabled like XCache.

./configure --disable-all

# uname -a
Linux whisky 2.6.18-xen #1 SMP Tue Feb 12 06:40:50 UTC 2008 x86_64
GNU/Linux

# file sapi/cli/php
sapi/cli/php: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not
stripped

# sapi/cli/php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:13:12) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies



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/47730

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



#47730 [Fbk-Opn]: PHP crashes when errorHandler throws Exception

2009-03-25 Thread berblinger at krumedia dot de
 ID:   47730
 User updated by:  berblinger at krumedia dot de
 Reported By:  berblinger at krumedia dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

This segfault is also caused when any 3rd party modules are disabled.
As already said, we got several servers with very similar hardware and
OS ( including configuration ) and each of them makes PHP crash with
this snippet.

We recently upgraded from PHP 5.2.6 to PHP 5.2.9 and since this upgrade
we noticed this segfault.

Can i provide any other informations for you to help you fixing this
bug?


Previous Comments:


[2009-03-23 15:51:15] tombt081981 at hotmail dot com

I first just disabled XCache

= still seg fault , so XCache can't be the reason

Then i re-compiled with ./configure --disable-all

= still seg fault


# php -i
System = myhostname 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009
x86_64
Build Date = Mar 23 2009 16:43:14
Configure Command =  './configure'  '--disable-all'
Server API = Command Line Interface
Virtual Directory Support = disabled
Configuration File (php.ini) Path = /usr/local/lib
Loaded Configuration File = /usr/local/lib/php-cli.ini
Scan this dir for additional .ini files = (none)
additional .ini files parsed = (none)
PHP API = 20041225
PHP Extension = 20060613
Zend Extension = 220060519
Debug Build = no
Thread Safety = disabled
Zend Memory Manager = enabled
IPv6 Support = enabled
Registered PHP Streams = php, file, data, http, ftp
Registered Stream Socket Transports = tcp, udp, unix, udg
Registered Stream Filters = string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed

#...



[2009-03-23 15:27:39] scott...@php.net

I can't reproduce this with 5.2.9 / 5.2.10-dev, can you try a build
with everything disabled. Also make sure all third party modules are
disabled like XCache.

./configure --disable-all

# uname -a
Linux whisky 2.6.18-xen #1 SMP Tue Feb 12 06:40:50 UTC 2008 x86_64
GNU/Linux

# file sapi/cli/php
sapi/cli/php: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not
stripped

# sapi/cli/php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:13:12) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies



[2009-03-23 15:11:42] tombt081981 at hotmail dot com

I get this segmentation fault, too, on a Debian 5.0 with php 5.2.9. (i
use XCache, maybe this is relevant?)



[2009-03-23 13:10:22] work at setor dot net

Have a same problem

# uname -a
Linux myhost 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31
EST 2009 x86_64 x86_64 x86_64 GNU/Linux

# php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:52:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Configure Command
'./configure' '--prefix=/ox/kayako/php' '--enable-mbstring'
'--with-curl' '--with-openssl' '--with-iconv' '--with-mysqli'
'--with-gd' '--with-ttf' '--enable-dbase' '--enable-soap'
'--with-apxs2=/ox/kayako/apache/bin/apxs' '--enable-fastcgi'
'--enable-force-cgi-redirect' '--with-libdir=lib64' '--with-png-dir'
'--with-jpeg-dir' '--with-mcrypt'
'--with-freetype-dir=/usr/include/freetype2' '--with-zlib' '--with-imap'
'--with-kerberos' '--with-imap-ssl' '--enable-cgi'
'--enable-force-cgi-redirect' '--enable-discard-path' '--with-iconv'
'--enable-shmop' '--enable-sysvmsg' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sockets' '--with-bz2' '--with-gettext'
'--enable-zip' '--enable-pcntl' '--with-readline'



[2009-03-23 11:58:47] berblinger at krumedia dot de

i just tested the Segmentation Fault error on another machine with
similar hardware and OS, the result was the same. 
- Segmentation fault caused.

# cat debian_version
5.0
# uname -a
Linux testserver.local 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC
2009 
x86_64 GNU/Linux

# php -v
PHP 5.2.9 (cli) (built: Mar 10 2009 04:26:53)
Copyright (c) 1997-2009 The PHP Group

Both servers are configured exactly with the same configure command.



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/47730

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



#47753 [Com]: PHP crashes when in class method argument throw Exception

2009-03-25 Thread berblinger at krumedia dot de
 ID:   47753
 Comment by:   berblinger at krumedia dot de
 Reported By:  work at setor dot net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Guess this is - as you already mentioned - the same problem like the
bug #47730. 
If you rewrite the execute() function to something like this:
---

public function execute()
{
$tmp = $this-makeThrow();
$this-test( $tmp );
}

---

everything works fine. This segfault is only caused, when one of the
arguments of a valid function call throws an exception.


Previous Comments:


[2009-03-23 13:49:57] work at setor dot net

public function execute()
{
// this works
$pass = $this-makeThrow();
$this-test( $pass );
}

# uname -a
Linux myhost 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31
EST 2009 x86_64 x86_64 x86_64 GNU/Linux

# php -v
PHP 5.2.9 (cli) (built: Mar 23 2009 14:52:55)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Configure Command
'./configure' '--prefix=/ox/kayako/php' '--enable-mbstring'
'--with-curl' '--with-openssl' '--with-iconv' '--with-mysqli'
'--with-gd' '--with-ttf' '--enable-dbase' '--enable-soap'
'--with-apxs2=/ox/kayako/apache/bin/apxs' '--enable-fastcgi'
'--enable-force-cgi-redirect' '--with-libdir=lib64' '--with-png-dir'
'--with-jpeg-dir' '--with-mcrypt'
'--with-freetype-dir=/usr/include/freetype2' '--with-zlib'
'--with-imap'
'--with-kerberos' '--with-imap-ssl' '--enable-cgi'
'--enable-force-cgi-redirect' '--enable-discard-path' '--with-iconv'
'--enable-shmop' '--enable-sysvmsg' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sockets' '--with-bz2' '--with-gettext'
'--enable-zip' '--enable-pcntl' '--with-readline'


this code work fine in the same server with php 5.2.6 configured as:

'./configure' '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-libdir=lib64' '--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic'
'--disable-rpath' '--without-pear' '--with-bz2' '--with-curl'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf'
'--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp'
'--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png'
'--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib'
'--with-layout=GNU' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos'
'--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr'
'--enable-memory-limit' '--enable-shmop' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--without-mime-magic' '--without-sqlite'
'--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata'
'--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd'
'--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC'
'--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'
'--disable-json' '--without-pspell'



[2009-03-23 13:44:23] work at setor dot net

Description:

Looks like this bug #47730

php chashes (Segmentation fault). See reproduce code and comments
inside for further details.


Reproduce code:
---
?php

ini_set( 'display_errors', 1 );

class ExceptionBug
{
public function execute()
{
$this-test( $this-makeThrow() );
}

private function test( $test )
{
}

private function makeThrow()
{
throw new Exception( 'test' );
}
}

$Test = new ExceptionBug();
$Test-execute();

Expected result:

Fatal error: Uncaught exception 'Exception' with message 'test' in
/data2/www/test.php:18 Stack trace: #0 /data2/www/test.php(9):
ExceptionBug-makeThrow() #1 /data2/www/test.php(23):
ExceptionBug-execute() #2 {main} thrown in /data2/www/test.php on line
18

Actual result:
--
nothing. php crashes.

Segmentation fault in cli





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



#47730 [Opn]: PHP crashes when errorHandler throws Exception

2009-03-23 Thread berblinger at krumedia dot de
 ID:   47730
 User updated by:  berblinger at krumedia dot de
 Reported By:  berblinger at krumedia dot de
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

i just tested the Segmentation Fault error on another machine with
similar hardware and OS, the result was the same. 
- Segmentation fault caused.

# cat debian_version
5.0
# uname -a
Linux testserver.local 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC
2009 
x86_64 GNU/Linux

# php -v
PHP 5.2.9 (cli) (built: Mar 10 2009 04:26:53)
Copyright (c) 1997-2009 The PHP Group

Both servers are configured exactly with the same configure command.


Previous Comments:


[2009-03-22 12:07:25] berblinger at krumedia dot de

Configure Command
'./configure' '--with-apxs2=/usr/bin/apxs2' 
'--with-mysql=/usr/local/mysql' '--enable-soap' '--enable-bcmath' 
'--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/lib' 
'--with-xpm-dir=/usr/lib' '--with-freetype-dir=/usr/lib' 
'--with-t1lib=/usr/lib' '--with-ttf' '--enable-shmop'
'--enable-sockets' 
'--enable-zip' '--with-zlib' '--with-mcrypt' '--enable-mbstring'

The testing environment is running under Debian 5.0, (AMD 64bit core).
I will test if the source will crash on another machine the next week,
please be patient. I will provide any results as soon as possible.



[2009-03-21 23:08:33] j...@php.net

Also, what was the configure line used to compile PHP? 



[2009-03-21 23:07:28] j...@php.net

I can't reproduce it on Linux 64-bit. Can you reproduce this on some 
other machine with same OS?




[2009-03-21 11:03:15] berblinger at krumedia dot de

It seems, that this crash is only reproducible under a Linux 64bit
environment. I just tried to reproduce it using Vista x64 and PHP 5.2.9,
but everything worked fine.

Can i provide any further informations to help you fixing this problem?
Please tell me, if there's anything i could do.



[2009-03-21 00:40:27] fel...@php.net

I can't reproduce it on Linux 32-bit.



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/47730

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



#47730 [Fbk-Opn]: PHP crashes when errorHandler throws Exception

2009-03-22 Thread berblinger at krumedia dot de
 ID:   47730
 User updated by:  berblinger at krumedia dot de
 Reported By:  berblinger at krumedia dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Configure Command
'./configure' '--with-apxs2=/usr/bin/apxs2' 
'--with-mysql=/usr/local/mysql' '--enable-soap' '--enable-bcmath' 
'--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/lib' 
'--with-xpm-dir=/usr/lib' '--with-freetype-dir=/usr/lib' 
'--with-t1lib=/usr/lib' '--with-ttf' '--enable-shmop'
'--enable-sockets' 
'--enable-zip' '--with-zlib' '--with-mcrypt' '--enable-mbstring'

The testing environment is running under Debian 5.0, (AMD 64bit core).
I will test if the source will crash on another machine the next week,
please be patient. I will provide any results as soon as possible.


Previous Comments:


[2009-03-21 23:08:33] j...@php.net

Also, what was the configure line used to compile PHP? 



[2009-03-21 23:07:28] j...@php.net

I can't reproduce it on Linux 64-bit. Can you reproduce this on some 
other machine with same OS?




[2009-03-21 11:03:15] berblinger at krumedia dot de

It seems, that this crash is only reproducible under a Linux 64bit
environment. I just tried to reproduce it using Vista x64 and PHP 5.2.9,
but everything worked fine.

Can i provide any further informations to help you fixing this problem?
Please tell me, if there's anything i could do.



[2009-03-21 00:40:27] fel...@php.net

I can't reproduce it on Linux 32-bit.



[2009-03-20 16:52:31] berblinger at krumedia dot de

generated backtrace, i hope this will help you finding a proper
solution for this bug.

#0  zend_do_fcall_common_helper_SPEC (execute_data=0x7fff88d8dd20, 
tsrm_ls=0x1051090) at /software/php-5.2.9/Zend/zend_vm_execute.h:289
#1  0x00767097 in execute (op_array=0x12abef0, 
tsrm_ls=0x1051090) at /software/php-5.2.9/Zend/zend_vm_execute.h:92
#2  0x0073f2e2 in zend_execute_scripts (type=8, 
tsrm_ls=0x1051090, retval=value optimized out, file_count=3) at 
/software/php-5.2.9/Zend/zend.c:1134
#3  0x006f20d6 in php_execute_script 
(primary_file=0x7fff88d90400, tsrm_ls=0x1051090) at 
/software/php-5.2.9/main/main.c:2023
#4  0x007bdd37 in main (argc=2, argv=0x7fff88d905e8) at 
/software/php-5.2.9/sapi/cli/php_cli.c:1133



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/47730

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



#47730 [Opn]: PHP crashes when errorHandler throws Exception

2009-03-21 Thread berblinger at krumedia dot de
 ID:   47730
 User updated by:  berblinger at krumedia dot de
 Reported By:  berblinger at krumedia dot de
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

It seems, that this crash is only reproducible under a Linux 64bit
environment. I just tried to reproduce it using Vista x64 and PHP 5.2.9,
but everything worked fine.

Can i provide any further informations to help you fixing this problem?
Please tell me, if there's anything i could do.


Previous Comments:


[2009-03-21 00:40:27] fel...@php.net

I can't reproduce it on Linux 32-bit.



[2009-03-20 16:52:31] berblinger at krumedia dot de

generated backtrace, i hope this will help you finding a proper
solution for this bug.

#0  zend_do_fcall_common_helper_SPEC (execute_data=0x7fff88d8dd20, 
tsrm_ls=0x1051090) at /software/php-5.2.9/Zend/zend_vm_execute.h:289
#1  0x00767097 in execute (op_array=0x12abef0, 
tsrm_ls=0x1051090) at /software/php-5.2.9/Zend/zend_vm_execute.h:92
#2  0x0073f2e2 in zend_execute_scripts (type=8, 
tsrm_ls=0x1051090, retval=value optimized out, file_count=3) at 
/software/php-5.2.9/Zend/zend.c:1134
#3  0x006f20d6 in php_execute_script 
(primary_file=0x7fff88d90400, tsrm_ls=0x1051090) at 
/software/php-5.2.9/main/main.c:2023
#4  0x007bdd37 in main (argc=2, argv=0x7fff88d905e8) at 
/software/php-5.2.9/sapi/cli/php_cli.c:1133



[2009-03-20 13:31:16] paj...@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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

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.





[2009-03-20 13:04:45] berblinger at krumedia dot de

Description:

Looks like this bug is related to the fixed bug #45805 in PHP version
5.2.8.

php still crashes, when the source of the defective expression is
called within a function-call. See reproduce code and comments inside
for further details.

Reproduce code:
---
?php
function errorHandler($errno, $errstr, $errfile, $errline){
throw new Exception('test');
}
set_error_handler('errorHandler');
error_reporting( E_ALL | E_STRICT);
class Foo{
private $crashHelper = null;
public function test(){
$bar = new Bar;
/* Crashes */
//$bar-someFunction($this-crashHelper-notDefined);

/* this works */
$tmp = $this-crashHelper-notDefined;
$bar-someFunction($tmp);
}
}

class Bar{
public function someFunction($tmp){ }
}

$foo = new Foo;
$foo-test();
?

Expected result:

Fatal error: Uncaught exception 'Exception' with message 'test' [...]
thrown in /htdocs/test/pub/eerrorHandlerTest.php on line 3

Actual result:
--
nothing. php crashes.





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



#47730 [NEW]: PHP crashes when errorHandler throws Exception

2009-03-20 Thread berblinger at krumedia dot de
From: berblinger at krumedia dot de
Operating system: Linux
PHP version:  5.2.9
PHP Bug Type: Reproducible crash
Bug description:  PHP crashes when errorHandler throws Exception

Description:

Looks like this bug is related to the fixed bug #45805 in PHP version
5.2.8.

php still crashes, when the source of the defective expression is called
within a function-call. See reproduce code and comments inside for further
details.

Reproduce code:
---
?php
function errorHandler($errno, $errstr, $errfile, $errline){
throw new Exception('test');
}
set_error_handler('errorHandler');
error_reporting( E_ALL | E_STRICT);
class Foo{
private $crashHelper = null;
public function test(){
$bar = new Bar;
/* Crashes */
//$bar-someFunction($this-crashHelper-notDefined);

/* this works */
$tmp = $this-crashHelper-notDefined;
$bar-someFunction($tmp);
}
}

class Bar{
public function someFunction($tmp){ }
}

$foo = new Foo;
$foo-test();
?

Expected result:

Fatal error: Uncaught exception 'Exception' with message 'test' [...]
thrown in /htdocs/test/pub/eerrorHandlerTest.php on line 3

Actual result:
--
nothing. php crashes.

-- 
Edit bug report at http://bugs.php.net/?id=47730edit=1
-- 
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47730r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47730r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47730r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47730r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47730r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47730r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=47730r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=47730r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=47730r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=47730r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=47730r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=47730r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=47730r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47730r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=47730r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=47730r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=47730r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=47730r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=47730r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=47730r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=47730r=mysqlcfg



#47730 [Fbk-Opn]: PHP crashes when errorHandler throws Exception

2009-03-20 Thread berblinger at krumedia dot de
 ID:   47730
 User updated by:  berblinger at krumedia dot de
 Reported By:  berblinger at krumedia dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

generated backtrace, i hope this will help you finding a proper
solution for this bug.

#0  zend_do_fcall_common_helper_SPEC (execute_data=0x7fff88d8dd20, 
tsrm_ls=0x1051090) at /software/php-5.2.9/Zend/zend_vm_execute.h:289
#1  0x00767097 in execute (op_array=0x12abef0, 
tsrm_ls=0x1051090) at /software/php-5.2.9/Zend/zend_vm_execute.h:92
#2  0x0073f2e2 in zend_execute_scripts (type=8, 
tsrm_ls=0x1051090, retval=value optimized out, file_count=3) at 
/software/php-5.2.9/Zend/zend.c:1134
#3  0x006f20d6 in php_execute_script 
(primary_file=0x7fff88d90400, tsrm_ls=0x1051090) at 
/software/php-5.2.9/main/main.c:2023
#4  0x007bdd37 in main (argc=2, argv=0x7fff88d905e8) at 
/software/php-5.2.9/sapi/cli/php_cli.c:1133


Previous Comments:


[2009-03-20 13:31:16] paj...@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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

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.





[2009-03-20 13:04:45] berblinger at krumedia dot de

Description:

Looks like this bug is related to the fixed bug #45805 in PHP version
5.2.8.

php still crashes, when the source of the defective expression is
called within a function-call. See reproduce code and comments inside
for further details.

Reproduce code:
---
?php
function errorHandler($errno, $errstr, $errfile, $errline){
throw new Exception('test');
}
set_error_handler('errorHandler');
error_reporting( E_ALL | E_STRICT);
class Foo{
private $crashHelper = null;
public function test(){
$bar = new Bar;
/* Crashes */
//$bar-someFunction($this-crashHelper-notDefined);

/* this works */
$tmp = $this-crashHelper-notDefined;
$bar-someFunction($tmp);
}
}

class Bar{
public function someFunction($tmp){ }
}

$foo = new Foo;
$foo-test();
?

Expected result:

Fatal error: Uncaught exception 'Exception' with message 'test' [...]
thrown in /htdocs/test/pub/eerrorHandlerTest.php on line 3

Actual result:
--
nothing. php crashes.





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