Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88005 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52890 invoked from network); 2 Sep 2015 07:41:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2015 07:41:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.41 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.41 mail-pa0-f41.google.com Received: from [209.85.220.41] ([209.85.220.41:35263] helo=mail-pa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/67-23910-A28A6E55 for ; Wed, 02 Sep 2015 03:41:32 -0400 Received: by pacfv12 with SMTP id fv12so2747439pac.2 for ; Wed, 02 Sep 2015 00:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=M/C9uDTna/nkQlVASYqZgKDKqXT6hiQEovWITTdh0p8=; b=QrUJhQhotdVgw0JyTYh7NpzFDQMh5wLgCKL5GY0N2MFJstsGN8vtO+oqT+Ld5h5HEt qdsmgl/5WS6DffB/YISprwV+nAw5T9J3WQUSIaSxEqfDKa7aaqY1NYehWCAq+J7KaGtV t4n3T00J0TZB6Oxifuvo9xsUyFlsfscldC1c3M+fr34h1SGB0Fy3hFK33phAavbIXQNw PY13kjekD4ILFKnoixunt+kja8E0QRmrO/C7PUsrV5yoUSeYzl7JAIpWRrMpCLp48EbY y0k52hR0FbBV2J0MW08KwN+Sfxr9z5cGuEnGbT7ljlXngR07wKc9btubPYEwwAi509rQ KHuA== X-Received: by 10.68.163.5 with SMTP id ye5mr52506455pbb.120.1441179688220; Wed, 02 Sep 2015 00:41:28 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by smtp.gmail.com with ESMTPSA id ff4sm16949267pab.2.2015.09.02.00.41.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Sep 2015 00:41:27 -0700 (PDT) To: Dmitry Stogov References: <55E698CA.4040809@gmail.com> Cc: PHP Internals Message-ID: <55E6A81D.6050109@gmail.com> Date: Wed, 2 Sep 2015 00:41:17 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: object_properties_load() does not work for non-string keys - intentional? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > I don't see the crash. Integer keys are supported in exactly the same > way as it was in PHP-5. I see the crash on this test: https://github.com/smalyshev/php-src/blob/master/ext/spl/tests/bug70155.phpt I'm not sure how integer keys are supported the same way if I see this in the code: https://github.com/php/php-src/blob/master/Zend/zend_API.c#L1248 ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) { property_info = zend_get_property_info(object->ce, key, 1); The loop doesn't even consider the possibility of key being NULL (which happens with integer key) and only considers string keys, and, if the key is integer, zend_get_property_info gets null as key argument and segfaults. -- Stas Malyshev smalyshev@gmail.com