From 156c4eb2e9a836337ecfdb98bd76835ceb470b0b Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 23 Oct 2023 23:42:45 +0200 Subject: [PATCH] Cleanup --- README.md | 12 +++++++++- bugs/1_composer.sh | 25 +++++++++++++++++++ bugs/{3_psalm_new.sh => 2_psalm_new.sh} | 2 +- bugs/3_madeline.sh | 16 +++++++++++++ bugs/{1_infection.sh => 4_infection.sh} | 4 ++-- bugs/{2_psalm.sh => 5_psalm.sh} | 0 bugs/{1_infection.php => infection.php} | 0 bugs/wrap_madeline.php | 32 +++++++++++++++++++++++++ 8 files changed, 87 insertions(+), 4 deletions(-) create mode 100755 bugs/1_composer.sh rename bugs/{3_psalm_new.sh => 2_psalm_new.sh} (90%) create mode 100755 bugs/3_madeline.sh rename bugs/{1_infection.sh => 4_infection.sh} (90%) rename bugs/{2_psalm.sh => 5_psalm.sh} (100%) rename bugs/{1_infection.php => infection.php} (100%) create mode 100644 bugs/wrap_madeline.php diff --git a/README.md b/README.md index 81d861f..1638b41 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,14 @@ Run using `./run.sh`. -Edit the branch in `Dockerfile:33` \ No newline at end of file +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 \ No newline at end of file diff --git a/bugs/1_composer.sh b/bugs/1_composer.sh new file mode 100755 index 0000000..1b3a1c1 --- /dev/null +++ b/bugs/1_composer.sh @@ -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!" \ No newline at end of file diff --git a/bugs/3_psalm_new.sh b/bugs/2_psalm_new.sh similarity index 90% rename from bugs/3_psalm_new.sh rename to bugs/2_psalm_new.sh index 3942ae3..6292b98 100755 --- a/bugs/3_psalm_new.sh +++ b/bugs/2_psalm_new.sh @@ -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!" \ No newline at end of file diff --git a/bugs/3_madeline.sh b/bugs/3_madeline.sh new file mode 100755 index 0000000..863d00f --- /dev/null +++ b/bugs/3_madeline.sh @@ -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 \ No newline at end of file diff --git a/bugs/1_infection.sh b/bugs/4_infection.sh similarity index 90% rename from bugs/1_infection.sh rename to bugs/4_infection.sh index 2ef8e3e..1a393d1 100755 --- a/bugs/1_infection.sh +++ b/bugs/4_infection.sh @@ -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" diff --git a/bugs/2_psalm.sh b/bugs/5_psalm.sh similarity index 100% rename from bugs/2_psalm.sh rename to bugs/5_psalm.sh diff --git a/bugs/1_infection.php b/bugs/infection.php similarity index 100% rename from bugs/1_infection.php rename to bugs/infection.php diff --git a/bugs/wrap_madeline.php b/bugs/wrap_madeline.php new file mode 100644 index 0000000..abb0197 --- /dev/null +++ b/bugs/wrap_madeline.php @@ -0,0 +1,32 @@ +