[php-src] Issue #12558: arginfo soft-breaks with namespaced class return type if the class name starts with N

From: Date: Sun, 29 Oct 2023 20:12:29 +0000
Subject: [php-src] Issue #12558: arginfo soft-breaks with namespaced class return type if the class name starts with N
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245676@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12558 Author: nielsdos ### Description Make the following change on master to the test.stub.php file: ```diff diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index cc76a3a739..fe7a8a0ce2 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -267,6 +267,8 @@ class Foo { public function method(): void {} } + class Node {} + function namespaced_func(): bool {} /** @deprecated */ @@ -280,6 +282,8 @@ function namespaced_aliased_func(): void {} * @alias zend_test_void_return */ function namespaced_deprecated_aliased_func(): void {} + + function breaks(): Node {} } namespace ZendTestNS2\ZendSubNS { ``` Now regenerate the arginfo. Now configure using: CC=clang CXX=clang++ ./configure --enable-debug --enable-zend-test --enable-werror which is the same compiler and same --enable-werror flag that ASAN CI uses. Now make and you'll get: ``` ext/zend_test/test_arginfo.h:153:86: error: incomplete universal character name; treating as '\' followed by identifier [-Werror,-Wunicode] ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_ZendTestNS2_breaks, 0, 0, ZendTestNS2\\Node, 0) ``` I actually ran into this in my PR https://github.com/php/php-src/pull/12111 causing the ASAN build to fail. cc @kocsismate ### PHP Version 8.0+ ### Operating System _No response_

« previous php.bugs (#245676) next »