From:             
Operating system: Ubuntu 11.10 64bit
PHP version:      5.4SVN-2012-01-22 (SVN)
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Segmentation fail, if use trait

Description:
------------
Hello.

>From first build (RC1), on my computer PHP 5.4 (all RC and last SVN
version) mysteriously crushed on clean up phase, if used trait. It not
reproduces with small scripts, only if application has all havy libraries:
Doctrine2, Zend Framework 2 and many others.

It not serious error, if use application from console of open page in
Firefox, but Chrome often interrupts drawing of content.

Traits has attributes, abstract or static methods.

Actual result:
--------------
Valgrind output:
----------------

==18829== Invalid read of size 8
==18829==    at 0x7622E9: zend_mm_remove_from_free_list (zend_alloc.c:811)
==18829==    by 0x7624FD: _zend_mm_free_int (zend_alloc.c:2106)
==18829==    by 0x79693D: zend_hash_destroy (zend_hash.c:565)
==18829==    by 0x77F11B: destroy_zend_class (zend_opcode.c:295)
==18829==    by 0x79530B: zend_hash_apply_deleter (zend_hash.c:650)
==18829==    by 0x796E20: zend_hash_reverse_apply (zend_hash.c:804)
==18829==    by 0x77A5D5: shutdown_executor (zend_execute_API.c:305)
==18829==    by 0x788F64: zend_deactivate (zend.c:934)
==18829==    by 0x72939E: php_request_shutdown (main.c:1782)
==18829==    by 0x831053: do_cli (php_cli.c:1169)
==18829==    by 0x431A52: main (php_cli.c:1356)
==18829==  Address 0xd0bdd0b0d080d1b5 is not stack'd, malloc'd or
(recently) free'd
==18829== 
==18829== 
==18829== Process terminating with default action of signal 11 (SIGSEGV)
==18829==  General Protection Fault
==18829==    at 0x7622E9: zend_mm_remove_from_free_list (zend_alloc.c:811)
==18829==    by 0x7624FD: _zend_mm_free_int (zend_alloc.c:2106)
==18829==    by 0x79693D: zend_hash_destroy (zend_hash.c:565)
==18829==    by 0x77F11B: destroy_zend_class (zend_opcode.c:295)
==18829==    by 0x79530B: zend_hash_apply_deleter (zend_hash.c:650)
==18829==    by 0x796E20: zend_hash_reverse_apply (zend_hash.c:804)
==18829==    by 0x77A5D5: shutdown_executor (zend_execute_API.c:305)
==18829==    by 0x788F64: zend_deactivate (zend.c:934)
==18829==    by 0x72939E: php_request_shutdown (main.c:1782)
==18829==    by 0x831053: do_cli (php_cli.c:1169)
==18829==    by 0x431A52: main (php_cli.c:1356)
==18829== 
==18829== HEAP SUMMARY:
==18829==     in use at exit: 16,535,737 bytes in 19,198 blocks
==18829==   total heap usage: 23,697 allocs, 4,499 frees, 17,668,454 bytes
allocated
==18829== 
==18829== LEAK SUMMARY:
==18829==    definitely lost: 0 bytes in 0 blocks
==18829==    indirectly lost: 0 bytes in 0 blocks
==18829==      possibly lost: 0 bytes in 0 blocks
==18829==    still reachable: 16,535,737 bytes in 19,198 blocks
==18829==         suppressed: 0 bytes in 0 blocks
==18829== Reachable blocks (those to which a pointer was found) are not
shown.
==18829== To see them, rerun with: --leak-check=full --show-reachable=yes
==18829== 
==18829== For counts of detected and suppressed errors, rerun with: -v
==18829== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 10 from 6)

Core dump (gdb)
---------------

$ gdb /usr/local/bin/php  /home/alurin/temp/php/cores/core-php.19181
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
This GDB was configured as "x86_64-linux-gnu".
Reading symbols from /usr/local/bin/php...done.
[New LWP 19181]

warning: Can't read pathname for load map: Ошибка
ввода/вывода.
[Thread debugging using libthread_db enabled]
Core was generated by `php www/index.php'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000007622e9 in zend_mm_remove_from_free_list (heap=0x298d2e0,
mm_block=0x7f3a2281ff30) at
/home/alurin/temp/php/php-src-5.4/Zend/zend_alloc.c:811
811                             while (*(cp = &(prev->child[prev->child[1] != 
NULL])) != NULL) {
(gdb) bt
#0  0x00000000007622e9 in zend_mm_remove_from_free_list (heap=0x298d2e0,
mm_block=0x7f3a2281ff30) at
/home/alurin/temp/php/php-src-5.4/Zend/zend_alloc.c:811
#1  0x00000000007624fe in _zend_mm_free_int (heap=0x298d2e0,
p=0x7f3a2281ffe0) at
/home/alurin/temp/php/php-src-5.4/Zend/zend_alloc.c:2106
#2  0x000000000079693e in zend_hash_destroy (ht=0x7f3a2281fad8) at
/home/alurin/temp/php/php-src-5.4/Zend/zend_hash.c:565
#3  0x000000000077f0f6 in destroy_zend_class (pce=<optimized out>) at
/home/alurin/temp/php/php-src-5.4/Zend/zend_opcode.c:293
#4  0x000000000079530c in zend_hash_apply_deleter (ht=0x298dc40,
p=0x2bc1550) at /home/alurin/temp/php/php-src-5.4/Zend/zend_hash.c:650
#5  0x0000000000796e21 in zend_hash_reverse_apply (ht=0x298dc40,
apply_func=0x779e90 <clean_non_persistent_class>) at
/home/alurin/temp/php/php-src-5.4/Zend/zend_hash.c:804
#6  0x000000000077a5d6 in shutdown_executor () at
/home/alurin/temp/php/php-src-5.4/Zend/zend_execute_API.c:305
#7  0x0000000000788f65 in zend_deactivate () at
/home/alurin/temp/php/php-src-5.4/Zend/zend.c:934
#8  0x000000000072939f in php_request_shutdown (dummy=<optimized out>) at
/home/alurin/temp/php/php-src-5.4/main/main.c:1782
#9  0x0000000000831054 in do_cli (argc=2, argv=0x7fff793746b8) at
/home/alurin/temp/php/php-src-5.4/sapi/cli/php_cli.c:1169
#10 0x0000000000431a53 in main (argc=2, argv=0x7fff793746b8) at
/home/alurin/temp/php/php-src-5.4/sapi/cli/php_cli.c:1356

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60837&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60837&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60837&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60837&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60837&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60837&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60837&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60837&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60837&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60837&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60837&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60837&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60837&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60837&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60837&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60837&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60837&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60837&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60837&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60837&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60837&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60837&r=mysqlcfg

Reply via email to