php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45307 define() crashes
Submitted: 2008-06-19 02:09 UTC Modified: 2008-06-19 11:28 UTC
From: crrodriguez at suse dot de Assigned: dmitry (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.3CVS-2008-06-19 (CVS) OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: crrodriguez at suse dot de
New email:
PHP Version: OS:

 

 [2008-06-19 02:09 UTC] crrodriguez at suse dot de
Description:
------------
Current 5_3 define() does not work at all.

Reproduce code:
---------------
<?php

define('FOO', true);

?>

Expected result:
----------------
constant defined

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2aaf0db95f20 (LWP 2042)]
0x0000000000760da6 in _zval_ptr_dtor (zval_ptr=0x7fff9f1de628,
    __zend_filename=0x8d3228 "/home/cristian/php53/Zend/zend_builtin_functions.c", __zend_lineno=522)
    at /home/cristian/php53/Zend/zend.h:372
372             return --pz->refcount__gc;
(gdb) bt
#0  0x0000000000760da6 in _zval_ptr_dtor (zval_ptr=0x7fff9f1de628,
    __zend_filename=0x8d3228 "/home/cristian/php53/Zend/zend_builtin_functions.c", __zend_lineno=522)
    at /home/cristian/php53/Zend/zend.h:372
#1  0x00000000007886e4 in zif_define (ht=2, return_value=0xd41268, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /home/cristian/php53/Zend/zend_builtin_functions.c:522
#2  0x00000000007a3753 in zend_do_fcall_common_helper_SPEC (execute_data=0x2aaf0b9de090) at /home/cristian/php53/Zend/zend_vm_execute.h:313
#3  0x00000000007a8e35 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x2aaf0b9de090)
    at /home/cristian/php53/Zend/zend_vm_execute.h:1527
#4  0x00000000007a27fd in execute (op_array=0xd40938) at /home/cristian/php53/Zend/zend_vm_execute.h:104
#5  0x0000000000774af3 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/cristian/php53/Zend/zend.c:1195
#6  0x00000000006f7506 in php_execute_script (primary_file=0x7fff9f1e0dd0) at /home/cristian/php53/main/main.c:2080
#7  0x00000000008177f8 in main (argc=2, argv=0x7fff9f1e1028) at /home/cristian/php53/sapi/cli/php_cli.c:1139


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-19 08:56 UTC] pajoye@php.net
verified and Dmitry will fix it asap.
 [2008-06-19 11:28 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 21 16:00:01 2025 UTC