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

 ID:                 64942
 Updated by:         fel...@php.net
 Reported by:        j_schumann at gmx dot de
 Summary:            Segfault after Cannot declare self-referencing
                     constant
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   Ubuntu 10.04.4 LTS
 PHP Version:        5.4.15
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------
[2013-05-29 10:01:47] j_schumann at gmx dot de

Description:
------------
This is a followup/duplicate to Bug #63669 as this is not mine and was 
suspended:

I get the same "PHP Fatal error: Cannot declare self-referencing constant" as 
the opener of #63669. But after this the process dies by a segmentation fault.

Debugging gave me the same error file/line, but I could reduce the number of 
possible sources: It only happens for me on instantiation of 
Zend_Validate_File_Count 
(http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Validate/File/Count.php).


Environment:
PHP 5.4.11
APC 3.1.13 
Apache 2.2.14
Ubuntu 10.04.4 LTS

Test script:
---------------
I can not provide a reproduction script as this does not happen always, so 
maybe it is instead an APC problem.

Expected result:
----------------
PHP Shutdown after the fatal error instead of segmentation fault.

Actual result:
--------------
I can provide a backtrace from the coredump (still using 5.4.11, I could 
produce a newer trace if required):

#0  0x00007fab657aec05 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fab6113c4e4 in xbuf_format_converter (xbuf=0x7fff625433b0, fmt=0x1 
<Address 0x1 out of bounds>, ap=0x7fff62542b20)
    at /build/buildd/php5-5.4.11/main/spprintf.c:576
#2  0x00007fab6113d214 in vspprintf (pbuf=0x7fff62543450, max_len=1024, 
format=0xffffffffffbd1ad6 <Address 0xffffffffffbd1ad6 out of bounds>, ap=0x18)
    at /build/buildd/php5-5.4.11/main/spprintf.c:799
#3  0x00007fab611367a8 in php_error_cb (type=1,
    error_filename=0x7fab56404f80 
"/var/www/application/library/Zend/File/Transfer/Adapter/Abstract.php", 
error_lineno=339,
    format=0x18 <Address 0x18 out of bounds>, args=0x7fff625436c8) at 
/build/buildd/php5-5.4.11/main/main.c:944
#4  0x00007fab61054710 in soap_error_handler (error_num=1447055232, 
error_filename=0x20 <Address 0x20 out of bounds>, error_lineno=32683,
    format=0x7fff62543be8 "\020", args=0x7fff62543de0) at 
/build/buildd/php5-5.4.11/ext/soap/soap.c:2171
#5  0x00007fab611993ec in zend_error (type=1, format=0x7fab6157c5b0 "Cannot 
declare self-referencing constant '%s'")
    at /build/buildd/php5-5.4.11/Zend/zend.c:1118
#6  0x00007fab6118a896 in zval_update_constant_ex (pp=0x7fab67731270, 
arg=0xffffffffffbd1ad6, scope=0x0)
    at /build/buildd/php5-5.4.11/Zend/zend_execute_API.c:502
#7  0x00007fab611a6d6a in zend_hash_apply_with_argument (ht=0x7fab67730b40, 
apply_func=0x7fab6118ad10 <zval_update_constant_inline_change>, argument=0x0)
    at /build/buildd/php5-5.4.11/Zend/zend_hash.c:740
#8  0x00007fab6118a732 in zval_update_constant_ex (pp=0x7fab67732918, 
arg=0xffffffffffbd1ad6, scope=0x0)
    at /build/buildd/php5-5.4.11/Zend/zend_execute_API.c:683
#9  0x00007fab6119bd8a in zend_update_class_constants 
(class_type=0x7fab67730f20) at /build/buildd/php5-5.4.11/Zend/zend_API.c:1037
#10 0x00007fab6119c02d in _object_and_properties_init (arg=0x7fab67730910, 
class_type=0x7fab67730f20, properties=0x0)
    at /build/buildd/php5-5.4.11/Zend/zend_API.c:1124
#11 0x00007fab611ff7d9 in ZEND_NEW_SPEC_HANDLER (execute_data=0x7fab6697a480) 
at /build/buildd/php5-5.4.11/Zend/zend_vm_execute.h:813
#12 0x00007fab611fa49f in execute (op_array=0x7fab67734dc8) at 
/build/buildd/php5-5.4.11/Zend/zend_vm_execute.h:410
#13 0x00007fab6119a208 in zend_execute_scripts (type=1178393146, retval=0x3, 
file_count=2049551044) at /build/buildd/php5-5.4.11/Zend/zend.c:1315
#14 0x00007fab611397e3 in php_execute_script (primary_file=0x0) at 
/build/buildd/php5-5.4.11/main/main.c:2492
#15 0x00007fab6124293d in php_handler (r=0x7fab6124293d) at 
/build/buildd/php5-5.4.11/sapi/apache2handler/sapi_apache2.c:682
#16 0x00007fab66527508 in ap_run_handler ()
#17 0x00007fab6652797e in ap_invoke_handler ()
#18 0x00007fab66536bdc in ap_internal_redirect ()
#19 0x00007fab5f45d5e5 in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#20 0x00007fab66527508 in ap_run_handler ()
#21 0x00007fab6652797e in ap_invoke_handler ()
#22 0x00007fab66537570 in ap_process_request ()
#23 0x00007fab66534398 in ?? ()
#24 0x00007fab6652dfa8 in ap_run_process_connection ()
#25 0x00007fab6653c1d0 in ?? ()
#26 0x00007fab6653c93a in ?? ()
#27 0x00007fab6653d4e7 in ap_mpm_run ()
#28 0x00007fab665124a4 in main ()

For my amateur view it looks like zend_error is called without the constant 
name which causes the segfault instead of an E_ERROR being thrown.


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



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

Reply via email to