#17115 [Opn]: lambda functions don't work with static vars

From: Date: Fri, 23 May 2003 23:17:19 +0000
Subject: #17115 [Opn]: lambda functions don't work with static vars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40320@lists.php.net to get a copy of this message
 ID:               17115
 Updated by:       moriyoshi@php.net
-Summary:          lambda functions produce segfault with static vars
 Reported By:      dan at widearea dot co dot uk
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: any
 PHP Version:      4.3.2-RC4
 New Comment:

update summary


Previous Comments:
------------------------------------------------------------------------

[2003-05-22 17:08:44] sniper@php.net

I can not reproduce this using RC4..


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

[2003-05-22 14:55:48] moriyoshi@php.net

update version

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

[2003-05-22 14:55:01] moriyoshi@php.net

But not the critical one.


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

[2002-12-03 05:27:03] niels at myplace dot dk

I see the same bug in 4.2.3. I haven't tried "latest".  
  
OS: Debian testing/unstable 
Configure Command: '../configure' '--prefix=/usr' 
'--prefix=/usr' '--with-regex=php' 
'--enable-force-cgi-redirect' 
'--with-config-file-path=/etc/php4/cgi' '--disable-rpath' 
'--disable-pear' '--disable-debug' '--enable-memory-limit' 
'--with-layout=GNU' '--enable-calendar' '--enable-sysvsem' 
'--enable-sysvshm' '--enable-track-vars' 
'--enable-trans-sid' '--enable-bcmath' '--with-bz2' 
'--enable-ctype' '--with-db2' '--with-iconv' 
'--enable-exif' '--enable-filepro' '--enable-ftp' 
'--with-gettext' '--enable-mbstring' 
'--with-pcre-regex=/usr' '--enable-shmop' 
'--enable-sockets' '--enable-wddx' '--disable-xml' 
'--with-expat-dir=/usr' '--enable-yp' '--with-zlib' 
'--without-pgsql' '--with-openssl=/usr' '--disable-static' 
'--without-mm' '--without-mysql' '--without-sybase-ct' 
  
$ sudo apt-get install php4/unstable  
Reading Package Lists... Done  
Building Dependency Tree... Done  
Selected version 4:4.2.3-3 (Debian:unstable) for php4  
Sorry, php4 is already the newest version.  
0 packages upgraded, 0 newly installed, 0 to remove and 0   
not upgraded.  
$ php4 -v  
4.2.3  
$ php4  
<?php  
$f = create_function('$s', 'static $foo = 0; echo "\$s is  
$s  
[".$foo++."]\n";');  
    print_r($f("one"));  
    print_r($f("two"));  
    print_r($f("three"));  
?>  
^DSegmentation fault  
$ _ 
 
I get similar results when running php under Apache. 
Error.log says: "child pid 12848 exit signal Segmentation 
fault (11)"

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

[2002-07-18 01:00:11] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

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

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



Thread (9 messages)

« previous php.bugs (#40320) next »