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

Trying to free someone else's memory frame! #1379

Closed
dreamsxin opened this issue Oct 14, 2013 · 3 comments
Closed

Trying to free someone else's memory frame! #1379

dreamsxin opened this issue Oct 14, 2013 · 3 comments

Comments

@dreamsxin
Copy link
Contributor

phpunit unit-tests/ViewEnginesVoltTest.php 
PHPUnit 3.6.10 by Sebastian Bergmann.

.Trying to free someone else's memory frame!
The frame was created by zim_Phalcon_Mvc_View_Engine_Volt_Compiler_parse
Calling function: phvolt_parse_view
#0  0x7f5667ca4e1b [/usr/lib/php5/20100525/phalcon.so(phalcon_print_backtrace+0x2f) [0x7f5667ca4e1b]]
#1  0x7f5667cbf81c [/usr/lib/php5/20100525/phalcon.so(phalcon_memory_restore_stack+0xee) [0x7f5667cbf81c]]
#2  0x7f5667efe748 [/usr/lib/php5/20100525/phalcon.so(phvolt_parse_view+0x68) [0x7f5667efe748]]
#3  0x7f5667dd01b8 [/usr/lib/php5/20100525/phalcon.so(zim_Phalcon_Mvc_View_Engine_Volt_Compiler_parse+0x1c4) [0x7f5667dd01b8]]
#4  0x7f5667c9e57f [/usr/lib/php5/20100525/phalcon.so(+0x4a3b57f) [0x7f5667c9e57f]]
#5  0x7f56768f05cb [/usr/lib/php5/20100525/xdebug.so(xdebug_execute_internal+0x1ca) [0x7f56768f05cb]]
#6  0x75f17e [/usr/bin/php() [0x75f17e]]
#7  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#8  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#9  0x6aa160 [/usr/bin/php(zend_call_function+0x980) [0x6aa160]]
#10  0x552366 [/usr/bin/php() [0x552366]]
#11  0x7f5667c9e57f [/usr/lib/php5/20100525/phalcon.so(+0x4a3b57f) [0x7f5667c9e57f]]
#12  0x7f56768f05cb [/usr/lib/php5/20100525/xdebug.so(xdebug_execute_internal+0x1ca) [0x7f56768f05cb]]
#13  0x75f17e [/usr/bin/php() [0x75f17e]]
#14  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#15  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#16  0x75f499 [/usr/bin/php() [0x75f499]]
#17  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#18  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#19  0x75f499 [/usr/bin/php() [0x75f499]]
#20  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#21  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#22  0x75f499 [/usr/bin/php() [0x75f499]]
#23  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#24  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#25  0x75f499 [/usr/bin/php() [0x75f499]]
#26  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#27  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#28  0x75f499 [/usr/bin/php() [0x75f499]]
#29  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#30  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#31  0x75f499 [/usr/bin/php() [0x75f499]]
#32  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#33  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#34  0x75f499 [/usr/bin/php() [0x75f499]]
#35  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#36  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#37  0x75f499 [/usr/bin/php() [0x75f499]]
#38  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#39  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#40  0x75f499 [/usr/bin/php() [0x75f499]]
#41  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#42  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#43  0x6b8a8c [/usr/bin/php(zend_execute_scripts+0x15c) [0x6b8a8c]]
#44  0x658733 [/usr/bin/php(php_execute_script+0x1d3) [0x658733]]
#45  0x761943 [/usr/bin/php() [0x761943]]
#46  0x42c8d0 [/usr/bin/php() [0x42c8d0]]
#47  0x7f5677becea5 [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f5677becea5]]
#48  0x42c965 [/usr/bin/php() [0x42c965]]

WARNING: calling phalcon_memory_restore_stack() without an active memory frame!
#0  0x7f5667ca4e1b [/usr/lib/php5/20100525/phalcon.so(phalcon_print_backtrace+0x2f) [0x7f5667ca4e1b]]
#1  0x7f5667cbf783 [/usr/lib/php5/20100525/phalcon.so(phalcon_memory_restore_stack+0x55) [0x7f5667cbf783]]
#2  0x7f5667dd01c9 [/usr/lib/php5/20100525/phalcon.so(zim_Phalcon_Mvc_View_Engine_Volt_Compiler_parse+0x1d5) [0x7f5667dd01c9]]
#3  0x7f5667c9e57f [/usr/lib/php5/20100525/phalcon.so(+0x4a3b57f) [0x7f5667c9e57f]]
#4  0x7f56768f05cb [/usr/lib/php5/20100525/xdebug.so(xdebug_execute_internal+0x1ca) [0x7f56768f05cb]]
#5  0x75f17e [/usr/bin/php() [0x75f17e]]
#6  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#7  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#8  0x6aa160 [/usr/bin/php(zend_call_function+0x980) [0x6aa160]]
#9  0x552366 [/usr/bin/php() [0x552366]]
#10  0x7f5667c9e57f [/usr/lib/php5/20100525/phalcon.so(+0x4a3b57f) [0x7f5667c9e57f]]
#11  0x7f56768f05cb [/usr/lib/php5/20100525/xdebug.so(xdebug_execute_internal+0x1ca) [0x7f56768f05cb]]
#12  0x75f17e [/usr/bin/php() [0x75f17e]]
#13  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#14  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#15  0x75f499 [/usr/bin/php() [0x75f499]]
#16  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
#17  0x7f56768f0168 [/usr/lib/php5/20100525/xdebug.so(xdebug_execute+0xd41) [0x7f56768f0168]]
#18  0x75f499 [/usr/bin/php() [0x75f499]]
#19  0x718c17 [/usr/bin/php(execute+0x207) [0x718c17]]
@ghost
Copy link

ghost commented Oct 14, 2013

Could you please try the latest 1.3.0?

$ phpunit unit-tests/ViewEnginesVoltTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.

................

Time: 0 seconds, Memory: 3.50Mb

OK (16 tests, 361 assertions)

@ghost ghost mentioned this issue Oct 14, 2013
@dreamsxin
Copy link
Contributor Author

@sjinks I test use you branch, result this:

phpunit unit-tests/ViewEnginesVoltTest.php 
PHPUnit 3.6.10 by Sebastian Bergmann.

.phalcon_memory_restore_stack_common: observed variable #1 (0x7f3d9b2af980) has 0 references
Segmentation fault
#0  0x00007ffadee08871 in phalcon_memory_restore_stack_common (phalcon_globals_ptr=0x7ffae485c980 <phalcon_globals>) at /home/zhuzx/work/cphalcon/ext/kernel/memory.c:98
#1  0x00007ffadee08e18 in phalcon_memory_restore_stack (func=0x7ffadf2a0d40 <__FUNCTION__.39281> "zim_Phalcon_Mvc_View_Engine_Volt_Compiler_parse")
    at /home/zhuzx/work/cphalcon/ext/kernel/memory.c:217
#2  0x00007ffadef183c9 in zim_Phalcon_Mvc_View_Engine_Volt_Compiler_parse (ht=1, return_value=0x7ffad8682958, return_value_ptr=0x7ffaf11da9f8, this_ptr=0x7ffad8682798, 
    return_value_used=0) at /home/zhuzx/work/cphalcon/ext/mvc/view/engine/volt/compiler.c:3840
#3  0x00007ffadede7b6f in phalcon_execute_internal (execute_data_ptr=0x7ffaf11da790, return_value_used=0) at /home/zhuzx/work/cphalcon/ext/phalcon.c:396
#4  0x00007ffaeda7f5cb in xdebug_execute_internal (current_execute_data=0x7ffaf11da790, return_value_used=0) at /build/buildd/xdebug-2.2.1/build-php5/xdebug.c:1481
#5  0x000000000075f17e in ?? ()
#6  0x0000000000718c17 in execute ()
#7  0x00007ffaeda7f168 in xdebug_execute (op_array=0x7ffad87ad090) at /build/buildd/xdebug-2.2.1/build-php5/xdebug.c:1391
#8  0x00000000006aa160 in zend_call_function ()
#9  0x0000000000552366 in ?? ()
#10 0x00007ffadede7b6f in phalcon_execute_internal (execute_data_ptr=0x7ffaf11d9e50, return_value_used=1) at /home/zhuzx/work/cphalcon/ext/phalcon.c:396
#11 0x00007ffaeda7f5cb in xdebug_execute_internal (current_execute_data=0x7ffaf11d9e50, return_value_used=1) at /build/buildd/xdebug-2.2.1/build-php5/xdebug.c:1481
#12 0x000000000075f17e in ?? ()
#13 0x0000000000718c17 in execute ()
#14 0x00007ffaeda7f168 in xdebug_execute (op_array=0x7ffad86b59d0) at /build/buildd/xdebug-2.2.1/build-php5/xdebug.c:1391
#15 0x000000000075f499 in ?? ()
#16 0x0000000000718c17 in execute ()
#17 0x00007ffaeda7f168 in xdebug_execute (op_array=0x7ffad86b5878) at /build/buildd/xdebug-2.2.1/build-php5/xdebug.c:1391
#18 0x000000000075f499 in ?? ()

@dreamsxin dreamsxin mentioned this issue Oct 15, 2013
phalcon pushed a commit that referenced this issue Oct 15, 2013
@phalcon
Copy link
Collaborator

phalcon commented Oct 15, 2013

Fixed in 1.3.0

@phalcon phalcon closed this as completed Oct 15, 2013
phalcon pushed a commit that referenced this issue Oct 15, 2013
@ghost ghost mentioned this issue Oct 17, 2013
phalcon pushed a commit that referenced this issue Oct 17, 2013
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

1 participant