From 232e81f82719014a04df143e827b0c06a60d0a6b Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 29 Dec 2023 16:50:34 +0100 Subject: [PATCH] More debugging attempts --- tests/dockerfiles/Dockerfile.alpine | 24 ++++++++++++++++-------- tests/dockerfiles/php.ini | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/dockerfiles/Dockerfile.alpine b/tests/dockerfiles/Dockerfile.alpine index 351dbcb79..6ca3e075c 100644 --- a/tests/dockerfiles/Dockerfile.alpine +++ b/tests/dockerfiles/Dockerfile.alpine @@ -259,14 +259,8 @@ STOPSIGNAL SIGQUIT EXPOSE 9000 -RUN apk add --no-cache make g++ && \ - curl -sSLf https://github.com/danog/PrimeModule-ext/archive/refs/tags/2.0.tar.gz | tar -xz && \ - cd PrimeModule-ext-2.0 && \ - make -j$(nproc) && \ - make install && \ - cd .. && \ - rm -r PrimeModule-ext-2.0 && \ - apk del make g++ +ENV CFLAGS="-g -O0" +ENV CXXFLAGS="-g -O0" ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ @@ -276,6 +270,18 @@ RUN chmod +x /usr/local/bin/install-php-extensions && \ RUN apk add --no-cache ffmpeg nghttp2 jemalloc +ENV CFLAGS="-g -O0 -fsanitize=address" +ENV CXXFLAGS="-g -O0 -fsanitize=address" + +RUN apk add --no-cache make g++ && \ + curl -sSLf https://github.com/danog/PrimeModule-ext/archive/refs/tags/2.0.tar.gz | tar -xz && \ + cd PrimeModule-ext-2.0 && \ + make -j$(nproc) && \ + make install && \ + cd .. && \ + rm -r PrimeModule-ext-2.0 && \ + apk del make g++ + ENV LD_PRELOAD=libjemalloc.so.2 ADD ./tests/dockerfiles/php.ini /usr/local/etc/php/php.ini @@ -284,6 +290,8 @@ ADD ./tests/jit.php /jit.php RUN php /jit.php && rm /jit.php +RUN apk add llvm + WORKDIR /app CMD ["php", "/app/bot.php"] diff --git a/tests/dockerfiles/php.ini b/tests/dockerfiles/php.ini index be924a69e..f91c23b4c 100644 --- a/tests/dockerfiles/php.ini +++ b/tests/dockerfiles/php.ini @@ -3,7 +3,7 @@ memory_limit = -1 display_errors = On display_startup_errors = On -ffi.enable=true +ffi.enable=0 ;zend_extension=opcache