mirror of
https://github.com/danog/jit_bugs.git
synced 2024-11-29 20:29:07 +01:00
Cleanup
This commit is contained in:
parent
14561fd8e1
commit
156c4eb2e9
10
README.md
10
README.md
@ -3,3 +3,13 @@
|
||||
Run using `./run.sh`.
|
||||
|
||||
Edit the branch in `Dockerfile:33`
|
||||
|
||||
## Tests
|
||||
|
||||
Tested on fa218eab4a9b5304afb871a4405546068cb65008
|
||||
|
||||
1. Composer: always fails
|
||||
2. Psalm: always fails
|
||||
3. MadelineProto: got a single shutdown hang the first time I tried (even with the new closure fixes), then nothing; expecting an assertion crash
|
||||
4. Infection: used to fail on some older php-src commit, now doesn't, still including it in order to play around with branches
|
||||
5. Psalm (unit): used to fail on some older php-src commit, now doesn't, still including it in order to play around with branches
|
25
bugs/1_composer.sh
Executable file
25
bugs/1_composer.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
standalone=$PWD/bugs/wrap.php
|
||||
|
||||
cd /tmp
|
||||
|
||||
rm -rf psalm
|
||||
|
||||
git clone https://github.com/vimeo/psalm
|
||||
cd psalm
|
||||
git checkout 7428e49b115a2a837aa29cf0fafd0ca902fe2457
|
||||
|
||||
git branch -D master || true
|
||||
git branch master
|
||||
git checkout master
|
||||
|
||||
cp $standalone .
|
||||
|
||||
echo "About to run composer"
|
||||
|
||||
rm -rf vendor
|
||||
|
||||
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /usr/bin/composer update --ignore-platform-reqs
|
||||
|
||||
echo "OK, no bugs!"
|
@ -28,6 +28,6 @@ echo "About to run composer"
|
||||
|
||||
rm -rf vendor
|
||||
|
||||
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /usr/bin/composer update
|
||||
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /usr/bin/composer update --ignore-platform-reqs
|
||||
|
||||
echo "OK, no bugs!"
|
16
bugs/3_madeline.sh
Executable file
16
bugs/3_madeline.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
standalone=$PWD/bugs/wrap_madeline.php
|
||||
|
||||
cd /tmp
|
||||
|
||||
rm -rf jit_test
|
||||
|
||||
wget https://paste.daniil.it/jit_1.tar.xz -c
|
||||
tar -xvf jit_1.tar.xz
|
||||
|
||||
cd jit_test
|
||||
|
||||
cp $standalone wrap.php
|
||||
|
||||
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php -d opcache.blacklist_filename=b.txt -f /app/wrap.php test.php
|
@ -3,7 +3,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
wrap=$PWD/bugs/wrap.php
|
||||
standalone=$PWD/bugs/1_infection.php
|
||||
standalone=$PWD/bugs/infection.php
|
||||
|
||||
cd /tmp
|
||||
|
||||
@ -19,7 +19,7 @@ cp $wrap .
|
||||
|
||||
echo "About to run the standalone test"
|
||||
|
||||
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /app/1_infection.php
|
||||
docker run -v $PWD:/app --rm --privileged -it asan_tests /usr/bin/php /app/wrap.php /app/infection.php
|
||||
|
||||
echo "About to run the testsuite"
|
||||
|
32
bugs/wrap_madeline.php
Normal file
32
bugs/wrap_madeline.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
var_dump(`rm -rf /tmp/aaa.madeline`);
|
||||
|
||||
register_shutdown_function(function () {
|
||||
$status = opcache_get_status(false);
|
||||
var_dump($status);
|
||||
|
||||
if ($status["memory_usage"]["free_memory"] < 10*1024*1024) {
|
||||
echo "Not enough free opcache memory!".PHP_EOL;
|
||||
}
|
||||
if ($status["interned_strings_usage"]["free_memory"] < 1*1024*1024) {
|
||||
echo "Not enough free interned strings memory!".PHP_EOL;
|
||||
}
|
||||
if ($status["jit"]["buffer_free"] < 10*1024*1024) {
|
||||
echo "Not enough free JIT memory!".PHP_EOL;
|
||||
}
|
||||
if (!$status["jit"]["on"]) {
|
||||
echo "JIT is not enabled!".PHP_EOL;
|
||||
}
|
||||
|
||||
unset($status);
|
||||
gc_collect_cycles();
|
||||
});
|
||||
|
||||
$argc--;
|
||||
array_shift($argv);
|
||||
|
||||
$_SERVER['argc']--;
|
||||
array_shift($_SERVER['argv']);
|
||||
|
||||
require $argv[0];
|
Loading…
Reference in New Issue
Block a user