#29081 [NEW]: Segmentation Fault when using Interface
| From: | jason at ionzoft dot com | Date: | Fri, 09 Jul 2004 21:15:42 +0000 |
| Subject: | #29081 [NEW]: Segmentation Fault when using Interface | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-61970@lists.php.net to get a copy of this message | ||
From: jason at ionzoft dot com
Operating system: Redhat ES 3.0 (Intel)
PHP version: 5.0.0RC3
PHP Bug Type: Reproducible crash
Bug description: Segmentation Fault when using Interface
Description:
------------
Hello,
I discovered this problem tonight while working on a new PHP 5 class that
uses an interface. The code example came from
http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading5
<?php
interface Throwable {
public function getMessage();
}
class MyException implements Throwable {
public function getMessage() {
echo "Hello\n";
}
}
$x = new MyException;
$x->getMessage();
?>
------------------
On this server, I get a Segmentation Fault:
[ionzoft@lithium dev]$ php -v
PHP 5.0.0RC3 (cli) (built: Jun 24 2004 17:35:13)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.0RC3, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.0.2, Copyright (c) 2003-2004, by Zend
Technologies
with Zend Optimizer v2.5.2, Copyright (c) 1998-2004, by Zend
Technologies
with Zend Debugger v3.5.0, Copyright (c) 1999-2004, by Zend
Technologies
[ionzoft@lithium dev]$ php -f Interface.php
Segmentation fault
------------------
On this server, It works fine:
[izsp@boron Jason]$ php -v
PHP 5.0.0RC3 (cli) (built: Jun 14 2004 14:04:10)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.0RC3, Copyright (c) 1998-2004 Zend Technologies
[izsp@boron Jason]$ php -f Interface.php
Hello
------------------
Could it be a problem with the Debugger?
Thanks,
Jason Garber
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Reproduce code:
---------------
<?php
interface Throwable {
public function getMessage();
}
class MyException implements Throwable {
public function getMessage() {
echo "Hello\n";
}
}
$x = new MyException;
$x->getMessage();
?>
Expected result:
----------------
Should print "Hello\n"
Actual result:
--------------
"Segmentation Fault"
--
Edit bug report at http://bugs.php.net/?id=29081&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29081&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29081&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29081&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29081&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29081&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29081&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29081&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29081&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29081&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29081&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29081&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29081&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29081&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29081&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29081&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29081&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29081&r=float