Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124832 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 56E801A00B7 for ; Thu, 8 Aug 2024 15:58:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723132797; bh=FvW8ZUh27GlETIErN2kYrP83/arUPe7QrsiDppQCNwc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=bKJF4KwyZoMuZQaP2eguz0Jsk7dl7fkSpsB164QGLlldgoLRwzg844ubI0AKKRbun Fvuu3oIYI0ZLNE5pteFpx1wpsEltJddkEvhdqXMYEsEh7c938pldzyptzfCkMFA6JP xJ5wmKutj9BCdWDnumTbaV9ly0tS3w5wHpme/l8sw9M+yr+94sUwlnJW5t2z8WSa0W JOxv8sas0/8PzOwUG1kHNSuyIPtm8m2jmBI7+2ZfLbZ7Tac5pr2Rw+pEBGddYOTKUv WNCLXSTh9OS2aArukdfb+fOlLB9QZhmkE/sfasIxTYQ4XPYLPL3cMH+D0u+bbr0+HF xHdifzSDwYEHA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 77F75180069 for ; Thu, 8 Aug 2024 15:59:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 8 Aug 2024 15:59:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1723132691; bh=dWA7ZyoI4WFhTm49jJetV8akejgg8Bl6JZ1ZP6YtaRU=; h=Content-Type:Message-ID:Date:MIME-Version:Subject:To:References: From:In-Reply-To:from:to:cc:subject:message-id; b=n0cqzHruo0fVHi+SbeTJj5ZPxAcZ2c/L3X9qRDyWpqd8V7TKCdiCHcH8cHWz4uKpE 0/6j2VMTpltbeL2VgEUagmp1Y0FwHkv88R5tdwAdh+HaitiLwYmJKwLbTbuk+GURxk zq/p1y/tErIlnb9nMNoVqytp+Uv+Q7rw2i/jzAj2WjlDzSx0+kGvyYlG0xAEfMsdyG EVy0M12/R8I8BKQvxPxNVYbuJWABHMfO8VXt+v/g6RPz1+YsRmbdUC9d0lM2eL2Sni YnQwPzjDnvF1/qsIuJCNgPHikoM9aNvZlw+fbO0PPipD5zZiHrHz/52vCrMJdDEGPQ Ao25ksbmMiE+g== Content-Type: multipart/mixed; boundary="------------gA7r6UyO1xDmYTyHQkXYDAbT" Message-ID: <3a327e83-3b12-427d-9559-cbce094968bb@bastelstu.be> Date: Thu, 8 Aug 2024 17:58:09 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] [VOTE] Transform exit() from a language construct into a standard function To: Theodore Brown , Derick Rethans , PHP internals , "Gina P. Banyard" References: <0FA837CD-60C3-4F4C-9044-C44FB0AF5788@php.net> Content-Language: en-US In-Reply-To: From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) This is a multi-part message in MIME format. --------------gA7r6UyO1xDmYTyHQkXYDAbT Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi On 8/7/24 22:33, Theodore Brown wrote: > I'm confused by this, since earlier in the thread Tim responded with examples showing how the behavior of exit() can still be observed and correctly handled. If that didn't address your issue, can you explain it further? It seems like right now everyone is left bewildered about what functionality you couldn't replicate. > Tideways generously sponsored 2 hours of my time to develop a proof of concept patch to fix Xdebug against the current version of Gina's PR. Much of that time was spent chasing a reference counting issue in an unfamiliar codebase. Unfortunately ASAN was not of much help, because running Xdebug's tests against PHP 8.4 reported some pre-existing memory leaks. I have attached two patches for Xdebug: 0001-Support-exit-as-function.patch: This patch fixes the build of Xdebug, by removing the references to ZEND_EXIT for PHP 8.4. It also adds a hook on the new exit() function to "deinitialize" Xdebug, which will ensure that profiling files are written for the use in CI. My understanding is that an alternative solution would have been to add a special `xdebug_finalize_profile()` function for use in CI instead of overloading the exit() function. All the existing tests in Xdebug's codebase pass after this patch, except that I did not adjust the profiler test expectations to take the the new exit() function call that was not previously there into account, because I do not fully understand the output format of the tests. Nevertheless the changes to the test output looked correct to me. 0002-Exit-coverage.patch: This patch adds support for the coverage analysis, so that Xdebug understands that any code after a call to exit() is unreachable. As far as I can tell this case was not previously tested by any of Xdebug's tests. I have thus added a test case, but I don't fully understand the output format of the coverage tests, thus I may have overlooked something. What I did verify is that the test fails when I remove the implementation from code_coverage.c. I'd like to note that this patch is not strictly necessary for Xdebug to be usable by a user. It might erroneously report unreachable code as reachable, but by definition unreachable code is useless. Thus a user of Xdebug could work around this by simply removing the unreachable code. My understanding is that some userland static analyzers and refactoring tools are already capable of pointing out such unreachable code. -------- Given my unfamiliarity of Xdebug's codebase and the limited time I spent preparing these patches, they should be considered a proof of concept only. They might or might not match the preferred coding style used in the Xdebug codebase. It might also be possible that they did not correctly handle an edge case, due to my lack of knowledge about the test infrastructure. Nevertheless I believe that someone more familiar with the codebase will certainly be able to adapt these patches as necessary to make Xdebug fully compatible with Gina's PR. In any case I believe they clearly showcase that it is not impossible to keep the existing functionality, even with Gina's RFC. Best regards Tim Düsterhus --------------gA7r6UyO1xDmYTyHQkXYDAbT Content-Type: text/x-patch; charset=UTF-8; name="0001-Support-exit-as-function.patch" Content-Disposition: attachment; filename="0001-Support-exit-as-function.patch" Content-Transfer-Encoding: base64 RnJvbSAyY2Q0ODlmY2JkYTEyMjg2MWU1YjMxMDY1YTIxMjA3NzdjZGIwNDZlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/VGltPTIwRD1DMz1CQ3N0ZXJodXM/ PSA8dGltQHRpZGV3YXlzLWdtYmguY29tPgpEYXRlOiBUaHUsIDggQXVnIDIwMjQgMTY6MDM6 NTggKzAyMDAKU3ViamVjdDogW1BBVENIIDEvMl0gU3VwcG9ydCBleGl0KCkgYXMgZnVuY3Rp b24KCi0tLQogc3JjL2Jhc2UvYmFzZS5jICAgICAgICAgICAgICB8IDIwICsrKysrKysrKysr KysrKysrKysrCiBzcmMvY292ZXJhZ2UvY29kZV9jb3ZlcmFnZS5jIHwgIDQgKysrKwogc3Jj L3Byb2ZpbGVyL3Byb2ZpbGVyLmMgICAgICB8IDEyICsrKysrKysrKysrKwogc3JjL3Byb2Zp bGVyL3Byb2ZpbGVyLmggICAgICB8ICAxICsKIDQgZmlsZXMgY2hhbmdlZCwgMzcgaW5zZXJ0 aW9ucygrKQoKZGlmZiAtLWdpdCBhL3NyYy9iYXNlL2Jhc2UuYyBiL3NyYy9iYXNlL2Jhc2Uu YwppbmRleCA5MmNmZjE5Yi4uMzU2YjA1MDQgMTAwNjQ0Ci0tLSBhL3NyYy9iYXNlL2Jhc2Uu YworKysgYi9zcmMvYmFzZS9iYXNlLmMKQEAgLTU1LDYgKzU1LDcgQEAgemlmX2hhbmRsZXIg b3JpZ19lcnJvcl9yZXBvcnRpbmdfZnVuYyA9IE5VTEw7CiB6aWZfaGFuZGxlciBvcmlnX3Nl dF90aW1lX2xpbWl0X2Z1bmMgPSBOVUxMOwogemlmX2hhbmRsZXIgb3JpZ19wY250bF9leGVj X2Z1bmMgPSBOVUxMOwogemlmX2hhbmRsZXIgb3JpZ19wY250bF9mb3JrX2Z1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FuZGxlcih2b2lkKTsKK3ZvaWQgeGRlYnVnX3Byb2ZpbGVyX2V4aXRf ZnVuY3Rpb25faGFuZGxlcih2b2lkKTsKIAogdm9pZCB4ZGVidWdfcHJvZmlsZXJfaW5pdF9p Zl9yZXF1ZXN0ZWQoemVuZF9vcF9hcnJheSAqb3BfYXJyYXkpOwogdm9pZCB4ZGVidWdfcHJv ZmlsZXJfZXhlY3V0ZV9leChmdW5jdGlvbl9zdGFja19lbnRyeSAqZnNlLCB6ZW5kX29wX2Fy cmF5ICpvcF9hcnJheSk7Ci0tIAoyLjQwLjEKCg== --------------gA7r6UyO1xDmYTyHQkXYDAbT Content-Type: text/x-patch; charset=UTF-8; name="0002-Exit-coverage.patch" Content-Disposition: attachment; filename="0002-Exit-coverage.patch" Content-Transfer-Encoding: base64 RnJvbSBkMzU2MGI3MTY5YTgyODkxOTgzNWI5OWEwN2MyNjdmZWQyOTdmNmViIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/VGltPTIwRD1DMz1CQ3N0ZXJodXM/ PSA8dGltQHRpZGV3YXlzLWdtYmguY29tPgpEYXRlOiBUaHUsIDggQXVnIDIwMjQgMTY6NTQ6 MTQgKzAyMDAKU3ViamVjdDogW1BBVENIIDIvMl0gRXhpdCBjb3ZlcmFnZQoKLS0tCiBzcmMv Y292ZXJhZ2UvY29kZV9jb3ZlcmFnZS5jICAgICAgfCA0MCArKysrKysrKysrKysrKysrKysr KysrKysrKysrKwogdGVzdHMvY292ZXJhZ2UvY292ZXJhZ2VfZXhpdC5pbmMgIHwgMTIgKysr KysrKysrCiB0ZXN0cy9jb3ZlcmFnZS9jb3ZlcmFnZV9leGl0LnBocHQgfCA0MiArKysrKysr KysrKysrKysrKysrKysrKysrKysrKysrCiAzIGZpbGVzIGNoYW5nZWQsIDk0IGluc2VydGlv bnMoKykKIGNyZWF0ZSBtb2RlIDEwMDY0NCB0ZXN0cy9jb3ZlcmFnZS9jb3Zlcm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