php-src/ext/phar
Niels Dossche dc586b121a Mark buildFromIterator test as conflicting
Commit 0b2e6bc2b0 started caching the directory entry type to improve
performance. Shortly after, we've seen flaky failures of the
buildFromIterator phar test.

When it fails, it's always a value error in the constructor of
RecursiveDirectoryIterator::__construct() with a "no such file or
directory" error. What's happening here is this:
1) A parallel test creates a subdirectory in the current working dir.
2) This test checks hasChildren() on a directory entry, the cached entry
   returns "yes" on the subdirectory.
3) The parallel test finishes and removes the subdirectory.
4) The constructor mentioned above is called, causing an exception
   because the directory is gone.

This race has always been possible, even before said commit. It's just
that it was very hard to hit before: the expensive stat call made the
race window hard to hit. The race is now easier to hit because of the
caching that is fast.

Since there's many tests that modify the current working directory, it
seems best to mark this as an "all" conflict. We cannot avoid every
TOC-TOU race when working with files with these phar tests.

In particular, mounteddir.phpt caused every conflict I saw on CI, but
there's more tests that create subdirectories in the current working
directory.

Closes GH-11869.
2023-08-04 21:08:39 +02:00
..
phar implement openssl_256 and openssl_512 for phar singatures 2021-08-11 14:13:57 +02:00
tests Mark buildFromIterator test as conflicting 2023-08-04 21:08:39 +02:00
build_precommand.php Apply tidy formatting 2020-02-03 13:41:31 +01:00
config.m4
config.w32
CREDITS
dirstream.c Merge branch 'PHP-8.0' into PHP-8.1 2023-07-31 19:53:43 +01:00
dirstream.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
func_interceptors.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
func_interceptors.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
gdbhelp
Makefile.frag Fix cross-compilation check in phar generation for FreeBSD 2023-06-13 19:09:58 +02:00
Makefile.frag.w32
makestub.php Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
phar.1.in implement openssl_256 and openssl_512 for phar singatures 2021-08-11 14:13:57 +02:00
phar.c Merge branch 'PHP-8.0' into PHP-8.1 2022-09-27 18:24:07 +02:00
phar.phar.1.in
phar_internal.h implement openssl_256 and openssl_512 for phar singatures 2021-08-11 14:13:57 +02:00
phar_object.c Fix use-of-uninitialized value in phar_object.c 2023-05-08 17:06:44 +02:00
phar_object.stub.php Merge branch 'PHP-8.0' into PHP-8.1 2021-09-08 12:32:58 +01:00
phar_object_arginfo.h Merge branch 'PHP-8.0' into PHP-8.1 2021-09-08 12:32:58 +01:00
phar_path_check.re Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
pharzip.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_phar.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
shortarc.php
stream.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
stream.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
stub.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
tar.c Fix undefined behaviour when writing 32-bit values in phar/tar.c 2023-03-26 16:06:29 +02:00
tar.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
util.c Add missing check on EVP_VerifyUpdate() in phar util 2023-07-09 22:54:27 +02:00
zip.c Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime) 2023-03-04 23:43:48 +01:00