Bug #76510 [Com]: file_exists() stopped working for phar:// in PHP 7.3
| From: | bugs dot php dot net at majkl578 dot cz | Date: | Fri, 03 Aug 2018 22:45:10 +0000 |
| Subject: | Bug #76510 [Com]: file_exists() stopped working for phar:// in PHP 7.3 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216571@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76510&edit=1
ID: 76510
Comment by: bugs dot php dot net at majkl578 dot cz
Reported by: sebastian@php.net
Summary: file_exists() stopped working for phar:// in PHP 7.3
Status: Open
Type: Bug
Package: PHAR related
Operating System: Linux
PHP Version: 7.3Git-2018-06-21 (Git)
Block user comment: N
Private report: N
New Comment:
Bisect log (bad: php-7.3.0beta1, good: php-7.2.9RC1) if anyone needs to replay:
# bad: [9160e881a6af72691ad034978e5078a8042ee9b6] Update versions for PHP 7.3.0beta1
# good: [09aa799e6448ed2a12b9371f8cdf31683b0c46aa] Update versions for PHP 7.2.9RC1
git bisect start 'php-7.3.0beta1' 'php-7.2.9RC1'
# good: [095a30e11b14dde32aabc002d627301bcbe7a927] Update NEWS [ci skip]
git bisect good 095a30e11b14dde32aabc002d627301bcbe7a927
# good: [095a30e11b14dde32aabc002d627301bcbe7a927] Update NEWS [ci skip]
git bisect good 095a30e11b14dde32aabc002d627301bcbe7a927
# bad: [6e94f943c1943984b55de159404d480f82357f7c] Avoid abs() type mismatch warnings
git bisect bad 6e94f943c1943984b55de159404d480f82357f7c
# bad: [bfe19cb355a82c14e03504f4499f267a51155a85] Merge branch 'PHP-7.2'
git bisect bad bfe19cb355a82c14e03504f4499f267a51155a85
# bad: [a06ba4b9d6621bd4bb7c387cf1439c7a356c8d72] Merge branch 'PHP-7.2'
git bisect bad a06ba4b9d6621bd4bb7c387cf1439c7a356c8d72
# good: [e6bfbb6c9d7524f62366c664ceb5056be7c55195] Merge branch 'PHP-7.2'
git bisect good e6bfbb6c9d7524f62366c664ceb5056be7c55195
# bad: [28fdc1f1c35392d1bbe16d4f8c76a2d661d70b0b] Merge branch 'PHP-7.2'
git bisect bad 28fdc1f1c35392d1bbe16d4f8c76a2d661d70b0b
# bad: [17b39f1216bf213838c7975d266808d4bc7ffb4c] Merge branch 'PHP-7.2'
git bisect bad 17b39f1216bf213838c7975d266808d4bc7ffb4c
# good: [902188e5e3889886d609696a7b5ed8ac12e071e2] Merge branch 'PHP-7.2'
git bisect good 902188e5e3889886d609696a7b5ed8ac12e071e2
# good: [b1cf87a4e6ef58987107709f89470168fd928452] Merge branch 'PHP-7.2'
git bisect good b1cf87a4e6ef58987107709f89470168fd928452
# good: [e20fbd43bad65d10af1e0d648f7bfa0c40baa893] Separate mbfl filters into three categories
git bisect good e20fbd43bad65d10af1e0d648f7bfa0c40baa893
# good: [fea7957d0836d8389c4b5063138277d7a21156b3] Optimize mb_chr()
git bisect good fea7957d0836d8389c4b5063138277d7a21156b3
# bad: [513b0093c2b480bb752fb354012f42c446769486] Refactor php_url struct to save memory dup in
common cases
git bisect bad 513b0093c2b480bb752fb354012f42c446769486
# good: [6546c516dd61f7f9efecbd9144c02218614d4c51] Optimized ucfirst(Avoid duping string if
possible)
git bisect good 6546c516dd61f7f9efecbd9144c02218614d4c51
# first bad commit: [513b0093c2b480bb752fb354012f42c446769486] Refactor php_url struct to save
memory dup in common cases
Previous Comments:
------------------------------------------------------------------------
[2018-08-03 22:43:33] bugs dot php dot net at majkl578 dot cz
Bisected to commit 513b0093c2b480bb752fb354012f42c446769486: Refactor php_url struct to save memory
dup in common cases [laurence]
https://github.com/php/php-src/commit/513b0093c2b480bb752fb354012f42c446769486
------------------------------------------------------------------------
[2018-08-03 21:37:22] bugs dot php dot net at majkl578 dot cz
Traced down to optimize-strlen GCC optimization (part of -O2).
does not work: -O2
works: -O2 -fno-optimize-strlen
------------------------------------------------------------------------
[2018-08-03 21:19:06] bugs dot php dot net at majkl578 dot cz
Did some digging using php-7.3.0beta1 tag and provided PHPUnit repro script in OP.
Compiling PHP with gcc-8 as such:
git clean -xdf && ./buildconf --force && ./configure CC=gcc-8 CFLAGS=XXX &&
make -j 12
With various GCC optimization levels, the results are:
gcc-8 with -O0 works
gcc-8 with -O1 works
gcc-8 with -O2 does not work
gcc-8 with -O3 does not work
gcc-8 with -Og works
gcc-8 with -Os works
gcc-8 with -Ofast does not compile
------------------------------------------------------------------------
[2018-06-29 12:01:30] sebastian@php.net
Interesting. Any idea what might be different on my system that would cause this? What I find weird
is that you were able to reproduce the issue initially but now you no longer can while I am still
seeing it.
------------------------------------------------------------------------
[2018-06-29 08:52:29] dc dot link at yahoo dot fr
Before that I update the phpunit repository did composer update.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=76510
--
Edit this bug report at https://bugs.php.net/bug.php?id=76510&edit=1