Add pipeline reproducer

This commit is contained in:
Daniil Gentili 2024-11-19 13:29:53 +01:00
parent 927eadfed4
commit 7bc61b2232
5 changed files with 40 additions and 16 deletions

View File

@ -1,4 +1,4 @@
FROM ubuntu:22.04 FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive

23
bugs/14_pipeline.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash -e
composer update
standalone=$PWD/bugs/wrap.php
refactor=$PWD/refactor.php
cd /tmp
rm -rf pipeline
git clone https://github.com/amphp/pipeline
cd pipeline
cp $standalone .
composer i --ignore-platform-reqs
sleep 3
docker run -v $PWD:/app --rm --privileged -it asan_tests bash -c 'export USE_ZEND_ALLOC=0; /usr/bin/php -d opcache.jit=tracing --repeat 2 -f /app/wrap.php /app/vendor/bin/phpunit'
echo "OK, no bugs!"

View File

@ -19,6 +19,7 @@ register_shutdown_function(function () use ($pid) {
} }
if (!$status["jit"]["on"]) { if (!$status["jit"]["on"]) {
echo "JIT is not enabled!".PHP_EOL; echo "JIT is not enabled!".PHP_EOL;
var_dump($status);
$ok = false; $ok = false;
} }

22
composer.lock generated
View File

@ -8,25 +8,25 @@
"packages": [ "packages": [
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v4.18.0", "version": "v4.19.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/715f4d25e225bc47b293a8b997fe6ce99bf987d2",
"reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-tokenizer": "*", "ext-tokenizer": "*",
"php": ">=7.0" "php": ">=7.1"
}, },
"require-dev": { "require-dev": {
"ircmaxell/php-yacc": "^0.0.7", "ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
}, },
"bin": [ "bin": [
"bin/php-parse" "bin/php-parse"
@ -58,18 +58,18 @@
], ],
"support": { "support": {
"issues": "https://github.com/nikic/PHP-Parser/issues", "issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.4"
}, },
"time": "2023-12-10T21:03:43+00:00" "time": "2024-09-29T15:01:53+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
"aliases": [], "aliases": [],
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": [], "stability-flags": {},
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": {},
"platform-dev": [], "platform-dev": {},
"plugin-api-version": "2.6.0" "plugin-api-version": "2.6.0"
} }

View File

@ -9,15 +9,15 @@ opcache.enable=1
opcache.enable_cli=1 opcache.enable_cli=1
opcache.jit=tracing opcache.jit=tracing
opcache.validate_timestamps=0 opcache.validate_timestamps=0
opcache.jit_buffer_size=1G opcache.jit_buffer_size=128M
opcache.file_update_protection=0 opcache.file_update_protection=0
opcache.max_accelerated_files=1000000 opcache.max_accelerated_files=1000000
opcache.interned_strings_buffer=64 opcache.interned_strings_buffer=64
opcache.jit_prof_threshold=0.000000001 opcache.jit_prof_threshold=0.000000001
opcache.jit_max_root_traces= 10000000 opcache.jit_max_root_traces= 100000
opcache.jit_max_side_traces= 10000000 opcache.jit_max_side_traces= 100000
opcache.jit_max_exit_counters=10000000 opcache.jit_max_exit_counters=100000
opcache.jit_hot_loop=1 opcache.jit_hot_loop=1
opcache.jit_hot_func=1 opcache.jit_hot_func=1
opcache.jit_hot_return=1 opcache.jit_hot_return=1