colder@jack /var/git/php-src $ phpvalgrind -r '$pq = new SplPriorityQueue(); $pq->insert("c", 1); foreach ($pq as $v) { }' ==5177== Memcheck, a memory error detector. ==5177== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==5177== Using LibVEX rev 1732, a library for dynamic binary translation. ==5177== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==5177== Using valgrind-3.2.3, a dynamic binary instrumentation framework. ==5177== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==5177== For more details, rerun with: -v ==5177== ==5177== Invalid read of size 4 ==5177== at 0x844F15B: ZEND_FE_FETCH_SPEC_VAR_HANDLER (zend_vm_execute.h:8744) ==5177== by 0x84346AF: execute (zend_vm_execute.h:91) ==5177== by 0x83E8D17: zend_u_eval_string (zend_execute_API.c:1437) ==5177== by 0x83E8F46: zend_u_eval_string_ex (zend_execute_API.c:1476) ==5177== by 0x83E8F9F: zend_eval_string_ex (zend_execute_API.c:1487) ==5177== by 0x849EBD9: main (php_cli.c:1191) ==5177== Address 0xBEC7EA9C is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==5177== ==5177== Invalid read of size 4 ==5177== at 0x844F18C: ZEND_FE_FETCH_SPEC_VAR_HANDLER (zend_vm_execute.h:8745) ==5177== by 0x84346AF: execute (zend_vm_execute.h:91) ==5177== by 0x83E8D17: zend_u_eval_string (zend_execute_API.c:1437) ==5177== by 0x83E8F46: zend_u_eval_string_ex (zend_execute_API.c:1476) ==5177== by 0x83E8F9F: zend_eval_string_ex (zend_execute_API.c:1487) ==5177== by 0x849EBD9: main (php_cli.c:1191) ==5177== Address 0xBEC7EA9C is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==5177== ==5177== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 15 from 4) ==5177== malloc/free: in use at exit: 8,098 bytes in 50 blocks. ==5177== malloc/free: 20,791 allocs, 20,741 frees, 2,371,296 bytes allocated. ==5177== For counts of detected errors, rerun with: -v ==5177== searching for pointers to 50 not-freed blocks. ==5177== checked 901,160 bytes. ==5177== ==5177== LEAK SUMMARY: ==5177== definitely lost: 0 bytes in 0 blocks. ==5177== possibly lost: 0 bytes in 0 blocks. ==5177== still reachable: 8,098 bytes in 50 blocks. ==5177== suppressed: 0 bytes in 0 blocks. ==5177== Reachable blocks (those to which a pointer was found) are not shown. ==5177== To see them, rerun with: --leak-check=full --show-reachable=yes