Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81022 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46259 invoked from network); 23 Jan 2015 05:50:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2015 05:50:48 -0000 Authentication-Results: pb1.pair.com header.from=laruence@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=xinchen.h@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.215.51 as permitted sender) X-PHP-List-Original-Sender: xinchen.h@zend.com X-Host-Fingerprint: 209.85.215.51 mail-la0-f51.google.com Received: from [209.85.215.51] ([209.85.215.51:47444] helo=mail-la0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/D0-61273-431E1C45 for ; Fri, 23 Jan 2015 00:50:45 -0500 Received: by mail-la0-f51.google.com with SMTP id ge10so5517247lab.10 for ; Thu, 22 Jan 2015 21:50:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=LN9X4MHk+JlRfHob+OfAurIdFZ45lmQSvHVgtBAS4dA=; b=CK0xchQlxlUtT/9A/Gb1kRp7J4ZygSA9ouIlf0uj82bY4mK6qEnzFljF/cKoODIqVK 2QWQi/6sgc+/36tvDWuyvQnRM9aHLi1QPFD1LDr46TH2bNYtWpe5VQ3cj/9kaoEwsPNw f3srSJYptKE+daTOUd6LYc1ovxRupXFmIaxGm53O9d3j6YVRxjGTkiY34P2l2NqcHFLx ykDHrbdDgZjBQjmB4zGSgb/g3qPaqUgU30J3xm5reMJNnDOfa8Nw3G9Osct+QE5LRkBy F5mppswL5AgVrIT/rC4fDy3146PfPOLYb+Io7FMstT8YVce620g1KXf5QFSayGzskE2P qfkA== X-Gm-Message-State: ALoCoQk32YWCxeEobwXsHdr+jSTIjbZybHmU8iDGrLTB5ga3V35+pu4j+uBPlSLdFCcnu1QUIwne28Bgp+JW7UBff0aIR4W+nABu8/lwuNTwj1wettZAFG6NM9hp0C0FWRRFpNO8LT/0j1bH6ctT7UyuDwQYm76XIQ== X-Received: by 10.112.119.167 with SMTP id kv7mr5485576lbb.62.1421992242042; Thu, 22 Jan 2015 21:50:42 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPSA id v5sm180517lby.9.2015.01.22.21.50.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 21:50:40 -0800 (PST) Received: by mail-lb0-f180.google.com with SMTP id b6so5290157lbj.11 for ; Thu, 22 Jan 2015 21:50:40 -0800 (PST) X-Received: by 10.152.115.212 with SMTP id jq20mr5495992lab.36.1421992240316; Thu, 22 Jan 2015 21:50:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.64.176 with HTTP; Thu, 22 Jan 2015 21:50:19 -0800 (PST) In-Reply-To: References: <54C12DD8.7020800@lerdorf.com> <54C16698.4080203@lsces.co.uk> <54C193A6.7060206@lerdorf.com> Date: Fri, 23 Jan 2015 13:50:19 +0800 Message-ID: To: Juan Basso Cc: Rasmus Lerdorf , Dan Ackroyd , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] PHP7 Homework for everyone reading this list From: laruence@php.net (Xinchen Hui) Hey: On Fri, Jan 23, 2015 at 1:17 PM, Juan Basso wrote: > 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? could you please try with the master again? thanks > > On Thu, Jan 22, 2015 at 11:45 PM, Juan Basso 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 >> wrote: >> >>> On 01/22/2015 02:30 PM, Dan Ackroyd wrote: >>> > On 22 January 2015 at 21:07, Lester Caine 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 >>> >>> >> -- Xinchen Hui @Laruence http://www.laruence.com/