ID:               41633
 User updated by:  m dot stach at ewerk dot com
 Reported By:      m dot stach at ewerk dot com
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Windows/MacOSX
 PHP Version:      5.2.3
 New Comment:

Sorry, the expected result I specified was wrong.

Expected Result
---------------

I would expect error message (parse, compile or runtime/fatal error).


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

[2007-06-08 13:35:19] m dot stach at ewerk dot com

Description:
------------
When instantiating classes with self-referencing constants PHP
crashes.

It is reproducable on Windows (5.2.3), Mac (5.2.2) and Linux (5.2.0).

Reproduce code:
---------------
class b {
  const FOO = self::FOO;
}

new b();

echo "1";

Expected result:
----------------
1

Actual result:
--------------
No output, segmentation fault instead. Since I don't have MSVC
available for backtrace, I tried on a mac and linux box, same result
(but Versions were 5.2.2 and 5.2.0).

Looks like an endless recursion.


Crash-Report:

Date/Time:      2007-06-08 14:55:00.261 +0200
OS Version:     10.4.9 (Build 8P135)
Report Version: 4

Command: php
Path:    /usr/local/bin/php
Parent:  bash [7590]

Version: ??? (???)

PID:    7604
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0xbf7ffff0

Thread 0 Crashed:
0   php         0x004ae698 _zend_mm_alloc_int + 12
1   php         0x004afd48 _emalloc + 100
2   php         0x004b0410 _estrndup + 44
3   php         0x004c158c zend_get_constant_ex + 256
4   php         0x004c3470 zval_update_constant_ex + 340
5   php         0x004c3ca8 zval_update_constant + 44
6   php         0x004c171c zend_get_constant_ex + 656

lines 4-6 repeated

506 php         0x004c3ca8 zval_update_constant + 44
507 php         0x004c171c zend_get_constant_ex + 656
508 php         0x004c3470 zval_update_constant_ex + 340



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


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

Reply via email to