Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103618 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21922 invoked from network); 21 Dec 2018 03:43:41 -0000 Received: from unknown (HELO mail-lj1-f170.google.com) (209.85.208.170) by pb1.pair.com with SMTP; 21 Dec 2018 03:43:41 -0000 Received: by mail-lj1-f170.google.com with SMTP id n18-v6so3168390lji.7 for ; Thu, 20 Dec 2018 16:13:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HoJSAEvxC/Y1sTzuFn4UCPcYiIqii+rObJy2zH7c8oE=; b=VXErH0VU6l5dGsIkk4NE63+lj4Kv6/4S35M5SgscEoEHFPCbr7N8BZ2jQ2dtQTUbXw 7brzMI4pL04qWEyaISaoVlX7xOAjaiRHY6Z68A1n/AtWGWRuBlhflIR9GFaz8psI01hF HqebcbokvB7F75oGdE2Vp62BiKXMjxTdUWtLrDFOWq8Ap1ol5YleW3lRWh5RrNd39yeS s5hapcKqg9xK9Rm3W8Cx1mAAlcyrJYyyC4O8NJfzNCL5vBAnyC1G63vCJC53U4JvNQ8u kMQgFOyr07dWp2Dnls3ceoVItW+JAdB+FWwexbucqh+IxU6V0IJqtfx/1nd/NKydkv2q cG5w== X-Gm-Message-State: AJcUukeS65+S6sZ96VOJfdSI5sIEngHXrJmHten9g5klW21p4db4aoBF H1elVTWTrFwDl1o+EAXYcG/acBgBNJXzYI1YgkI= X-Google-Smtp-Source: ALg8bN425c3jGYegDIVch9EXPQW8k0LkVWc1FkKCAzjuyfcg/0aXTwF1AS4H4mUSy5/UgzSbZ6AHCTEC8TEwoiWaxR0= X-Received: by 2002:a2e:851a:: with SMTP id j26-v6mr126328lji.163.1545351190270; Thu, 20 Dec 2018 16:13:10 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 20 Dec 2018 17:12:52 -0700 Message-ID: To: Dmitry Stogov Cc: internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC][Vote] Covariant Returns and Contravariant Parameters From: levim@php.net (Levi Morrison) On Thu, Dec 20, 2018 at 3:35 PM Dmitry Stogov wrote: > > Hi Levi, > > > It looks like the patch broke something related to opcache. > > It crashes at least on Wordpress and Drupal. > > The backtrace https://gist.github.com/dstogov/a2305381a5c9982cceca9e4e252d26c7 shows use-after-free in opcache (works fine with master). > > Inability to work with opcache, doesn't allow to check the performance impact. > > > It also broke few tests. Some crash. Some produce different warning/errors. > > > $ make test TESTS="Zend tests" > > ... > > ===================================================================== > FAILED TEST SUMMARY > --------------------------------------------------------------------- > ZE2 ArrayAccess and ArrayAccessReferenceProxy with references to main array [tests/classes/array_access_011.phpt] > Bug #21478 (Zend/zend_alloc.c :: shutdown_memory_manager produces segfault) [Zend/tests/bug21478.phpt] > Generator methods can yield by reference [Zend/tests/generators/generator_method_by_ref.phpt] > Testing to implement Serializable interface by traits [Zend/tests/traits/interface_003.phpt] > Handling of public fields with traits needs to have same semantics as with normal inheritance, however, we do add strict warnings since it is easier to run into something unexpeted with changing traits. [Zend/tests/traits/property009.phpt] > iterable type#004 - Parameter covariance [Zend/tests/type_declarations/iterable_004.phpt] > iterable type#005 - Return type covariance [Zend/tests/type_declarations/iterable_005.phpt] > ===================================================================== > > I'll try to play with patch and make a full code review on next week. > > > It would be great, if you fix opcache compatibility. > > If it can't be done in reasonable time, it's probably better to cancel voting and restart when ready. What OS and compiler are these on? How are you ensuring that opcache is on when these tests are run? I have not been experiencing these issues, so maybe I am not running it correctly. If I cannot reproduce them soon then I will agree to cancel the voting. There are some known issues outside of Zend. Notably some internal classes do not have valid method signatures with regards to inheritance which this patch exposed. These need fixed regardless of this RFC and I have begun work on some of them (see https://github.com/php/php-src/pull/3686 for one example).