diff --git a/src/Fuzzer.php b/src/Fuzzer.php index 153ce14..37686ae 100644 --- a/src/Fuzzer.php +++ b/src/Fuzzer.php @@ -55,6 +55,9 @@ public function __construct() { // Instrument everything apart from our src/ directory. $fileFilter = FileFilter::createAllWhitelisted(); $fileFilter->addBlackList(__DIR__); + // Only intercept file:// streams. Interception of phar:// streams may run into + // incorrect stat() handling during path resolution in PHP. + $protocols = ['file']; $this->interceptor = new Interceptor(function(string $path) use($fileFilter) { if (!$fileFilter->test($path)) { return null; @@ -65,7 +68,7 @@ public function __construct() { $instrumentedCode = $this->instrumentor->instrument($code, $fileInfo); $this->fileInfos[$path] = $fileInfo; return $instrumentedCode; - }); + }, $protocols); } private function loadTarget(string $path): void {