Add revoltphp reproducer

This commit is contained in:
Daniil Gentili 2023-11-14 17:53:34 +01:00
parent 243b169cae
commit f51ada0b1f
2 changed files with 26 additions and 3 deletions

View File

@ -7,8 +7,6 @@ ENV CXX=clang++-16
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/llvm-16/lib/clang/16/lib/linux/" ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/llvm-16/lib/clang/16/lib/linux/"
ADD php.ini /etc/php/php.ini
RUN true \ RUN true \
&& apt update \ && apt update \
&& apt install -y --no-install-recommends \ && apt install -y --no-install-recommends \
@ -33,7 +31,7 @@ RUN true \
libpcre2-dev libargon2-dev libedit-dev libsodium-dev llvm-16 libonig-dev \ libpcre2-dev libargon2-dev libedit-dev libsodium-dev llvm-16 libonig-dev \
gdb libcapstone-dev gdb libcapstone-dev
RUN git clone https://github.com/php/php-src -b PHP-8.3 --depth 1 && cd php-src \ RUN git clone https://github.com/php/php-src -b master --depth 1 && cd php-src \
&& ./buildconf \ && ./buildconf \
&& ./configure --prefix=/usr \ && ./configure --prefix=/usr \
--includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc \ --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc \
@ -58,6 +56,8 @@ RUN git clone https://github.com/php/php-src -b PHP-8.3 --depth 1 && cd php-src
&& make -j100 \ && make -j100 \
&& make install && make install
ADD php.ini /etc/php/php.ini
RUN php -r "readfile('https://getcomposer.org/installer');" | php \ RUN php -r "readfile('https://getcomposer.org/installer');" | php \
&& mv composer.phar /usr/bin/composer && mv composer.phar /usr/bin/composer

23
bugs/10_amp.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 event-loop
git clone https://github.com/revoltphp/event-loop
cd event-loop
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=1; /usr/bin/php -d opcache.jit=0 --repeat 2 -f /app/wrap.php /app/vendor/bin/phpunit'
echo "OK, no bugs!"