Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [CRASH] Segmentation fault in \Phalcon\Tag::tagHtml #1309

Closed
ghost opened this issue Sep 29, 2013 · 1 comment
Closed

[BUG] [CRASH] Segmentation fault in \Phalcon\Tag::tagHtml #1309

ghost opened this issue Sep 29, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 29, 2013

Test case:

--TEST--
Segmentation fault in \Phalcon\Tag::tagHtml
--FILE--
<?php
echo \Phalcon\Tag::tagHtml('aside');
?>
--EXPECT--
<aside></aside>

Backtrace:

#0  0x00007f6260ca319a in zval_addref_p (pz=0x0) at /home/vladimir/.phpenv/versions/5.3.26/include/php/Zend/zend.h:381
#1  phalcon_array_append (arr=0x7fff203c8858, value=0x0, flags=0) at /home/vladimir/workspace/cphalcon/ext/kernel/array.c:328
#2  0x00007f6260d4af0d in zim_Phalcon_Tag_tagHtml (ht=1, return_value=0x23ee448, return_value_ptr=0x7f625a36c160, this_ptr=0x0, return_value_used=1, tsrm_ls=0x1dd10c0) at /home/vladimir/workspace/cphalcon/ext/tag.c:1690
#3  0x00007f6260c95627 in phalcon_execute_internal (execute_data_ptr=0x7f625a36c098, return_value_used=1, tsrm_ls=0x1dd10c0) at /home/vladimir/workspace/cphalcon/ext/phalcon.c:385
#4  0x0000000000b006ca in zend_do_fcall_common_helper_SPEC (execute_data=0x7f625a36c098, tsrm_ls=0x1dd10c0) at /tmp/php-build/source/5.3.26/Zend/zend_vm_execute.h:324
#5  0x0000000000b01112 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x7f625a36c098, tsrm_ls=0x1dd10c0) at /tmp/php-build/source/5.3.26/Zend/zend_vm_execute.h:428
#6  0x0000000000aff5b0 in execute (op_array=0x23efb68, tsrm_ls=0x1dd10c0) at /tmp/php-build/source/5.3.26/Zend/zend_vm_execute.h:107
#7  0x0000000000ac232d in zend_execute_scripts (type=8, tsrm_ls=0x1dd10c0, retval=0x0, file_count=3) at /tmp/php-build/source/5.3.26/Zend/zend.c:1259
#8  0x0000000000a1af98 in php_execute_script (primary_file=0x7fff203caf50, tsrm_ls=0x1dd10c0) at /tmp/php-build/source/5.3.26/main/main.c:2316
#9  0x0000000000bce139 in main (argc=2, argv=0x7fff203cc248) at /tmp/php-build/source/5.3.26/sapi/cli/php_cli.c:1189
@ghost
Copy link
Author

ghost commented Sep 29, 2013

RETURN_CCTOR() is destructive because of phalcon_copy_ctor() which may set origin to NULL — this does not play well with phalcon_array_isset_fetch functions and pahclon_fetch_property functions as they do not increase the reference counter.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants