I could isolate the problem. Here is a script to reproduce: https://gist.github.com/jrbasso/031fffc8f5eeaf872d4e
The issue seems to be related when a new instance is loaded and then get_class_vars is called for the class holding the instance. Removing any of the lines from the static method avoids the error. Should I open an issue on bugs.php.net? On Thu, Jan 22, 2015 at 11:45 PM, Juan Basso <jrba...@gmail.com> wrote: > Trying to run phpunit on the latest CakePHP 3 gives a lot of errors of > this type (not on every test case): > > php: /.../php-src/Zend/zend_gc.c:144: gc_possible_root: Assertion > `((zend_refcounted*)(ref))->u.v.type == 7 || > ((zend_refcounted*)(ref))->u.v.type == 8' failed. > > This errors happens after the test is completed and all output from > PHPUnit is done. > I am using Ubuntu 12.04 with and the last commit of my php > is b8e262901e56a4d9a6664d348c9878246579239e (Thu Jan 22 14:04:49 2015 > -0800). > > This is the gdb backtrace: > > (gdb) bt > #0 0x00007ffff61840d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6 > #1 0x00007ffff618783b in abort () from /lib/x86_64-linux-gnu/libc.so.6 > #2 0x00007ffff617cd9e in ?? () from /lib/x86_64-linux-gnu/libc.so.6 > #3 0x00007ffff617ce42 in __assert_fail () from > /lib/x86_64-linux-gnu/libc.so.6 > #4 0x000000000090ed19 in gc_possible_root (ref=0x7ffff4038820) at > /.../php-src/Zend/zend_gc.c:144 > #5 0x00000000008f1b25 in gc_check_possible_root (z=0x7ffff40302e0) at > /.../php-src/Zend/zend_gc.h:145 > #6 0x00000000008f1b83 in i_zval_ptr_dtor (zval_ptr=0x7ffff40302e0, > __zend_filename=0xe493f0 "/.../php-src/Zend/zend_hash.c", > __zend_lineno=929) at /.../php-src/Zend/zend_variables.h:54 > #7 0x00000000008f4824 in zend_array_destroy (ht=0x7ffff40391e8) at > /.../php-src/Zend/zend_hash.c:929 > #8 0x00000000008de252 in _zval_dtor_func_for_ptr (p=0x7ffff40391e0, > __zend_filename=0xe46470 "/.../php-src/Zend/zend_opcode.c", > __zend_lineno=158) at /.../php-src/Zend/zend_variables.c:105 > #9 0x00000000008c76d4 in i_zval_ptr_dtor (zval_ptr=0x7ffff43e3130, > __zend_filename=0xe46470 "/.../php-src/Zend/zend_opcode.c", > __zend_lineno=158) at /.../php-src/Zend/zend_variables.h:52 > #10 0x00000000008c8b43 in _zval_ptr_dtor (zval_ptr=0x7ffff43e3130, > __zend_filename=0xe46470 "/.../php-src/Zend/zend_opcode.c", > __zend_lineno=158) at /.../php-src/Zend/zend_execute_API.c:483 > #11 0x00000000008cdbce in zend_cleanup_user_class_data (ce=0x7ffff400e918) > at /.../php-src/Zend/zend_opcode.c:158 > #12 0x00000000008c84b2 in shutdown_executor () at > /.../php-src/Zend/zend_execute_API.c:318 > #13 0x00000000008e08ce in zend_deactivate () at > /.../php-src/Zend/zend.c:886 > #14 0x0000000000851d09 in php_request_shutdown (dummy=0x0) at > /.../php-src/main/main.c:1856 > #15 0x00000000009861e2 in do_cli (argc=3, argv=0x11b1990) at > /.../php-src/sapi/cli/php_cli.c:1159 > #16 0x000000000098696a in main (argc=3, argv=0x11b1990) at > /.../php-src/sapi/cli/php_cli.c:1361 > > > Any idea? I am trying to isolate the problem, but may take a while. > > On Thu, Jan 22, 2015 at 7:19 PM, Rasmus Lerdorf <ras...@lerdorf.com> > wrote: > >> On 01/22/2015 02:30 PM, Dan Ackroyd wrote: >> > On 22 January 2015 at 21:07, Lester Caine <les...@lsces.co.uk> wrote: >> >> imagick is now available? >> > >> > Not yet. I'll try to finish it off before the end of the weekend. Most >> > of the work was done earlier, but I need to add the changes for the >> > Native TLS. >> > >> > btw this request to update the PHPNG upgrading guide is still open: >> > >> >> Thanks. I think the TSRM changes need to be added, which could be >> copied from: >> >> >> https://github.com/php/php-src/commit/dec8eb431adee340fb8dfb9ff33ed29d3279c35f >> >> Providing a link to a commit that implemented the TSRM changes for an >> >> extension, so that people could see the actual changes needed, would >> >> be awesome. >> >> For most extensions that just do something simple like imagick does: >> >> #ifdef ZTS >> # define IMAGICK_G(v) TSRMG(imagick_globals_id, zend_imagick_globals *, v) >> #else >> # define IMAGICK_G(v) (imagick_globals.v) >> #endif >> >> There is absolutely nothing to do. You can, just for your own amusement >> and because it makes the code look prettier, go through and remove all >> instances of TSRMLS_* macros in all your C files. But it isn't critical >> since they are just defined to nothing in PHP7. Just leave that TSRMG >> define in your .h file and it will do the right thing. >> >> -Rasmus >> >> >