Skip to content

Commit

Permalink
try without ASAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Aug 8, 2024
1 parent 8ded8d2 commit f9fcb2c
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/sanitizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
# Adapted from https://github.com/beberlei/hdrhistogram-php
sanitizers:
runs-on: ubuntu-latest
env:
#env:
#CFLAGS: -g -O0 -fsanitize=address -DZEND_TRACK_ARENA_ALLOC
#LDFLAGS: -fsanitize=address
CC: clang
CXX: clang++
#CC: clang
#CXX: clang++
steps:
-
uses: actions/checkout@v4
Expand Down Expand Up @@ -61,33 +61,34 @@ jobs:
--enable-debug \
--enable-embed \
--enable-zts \
--disable-zend-signals \
--disable-cli \
--disable-cgi \
--disable-phpdbg \
--prefix="$(pwd)/target/"
--disable-zend-signals
#--disable-cli \
#--disable-cgi \
#--disable-phpdbg \
#--prefix="$(pwd)/target/"
make -j"$(getconf _NPROCESSORS_ONLN)"
sudo make install
-
name: Add PHP to the PATH
run: |
echo "$(pwd)/php/target/bin" >> "$GITHUB_PATH"
#-
# name: Add PHP to the PATH
# run: |
# echo "$(pwd)/php/target/bin" >> "$GITHUB_PATH"
-
name: Set CGO flags
run: |
{
echo "LIBRARY_PATH=$LIBRARY_PATH:$(pwd)/php/target/lib"
#echo "LIBRARY_PATH=$LIBRARY_PATH:$(pwd)/php/target/lib"
# https://github.com/google/sanitizers/wiki/AddressSanitizerAsDso
#echo "LD_PRELOAD=$($CC -print-file-name=libclang_rt.asan-x86_64.so)"
echo "CGO_CFLAGS=-g -O0 -DZEND_TRACK_ARENA_ALLOC $(php-config --includes)"
echo "CGO_LDLAGS=$(php-config --ldflags || true) $(php-config --libs || true)"
#echo "CGO_CFLAGS=-g -O0 -DZEND_TRACK_ARENA_ALLOC $(php-config --includes)"
echo "CGO_CFLAGS=$(php-config --includes)"
echo "CGO_LDLAGS=$(php-config --ldflags) $(php-config --libs)"
} >> "$GITHUB_ENV"
-
name: Run library tests with sanitizers
env:
LSAN_OPTIONS: suppressions=suppr.txt
#env:
# LSAN_OPTIONS: suppressions=suppr.txt
run: |
echo 'leak:libbfd' > suppr.txt
echo 'leak:linux-gnu-ld.bfd' >> suppr.txt
#echo 'leak:libbfd' > suppr.txt
#echo 'leak:linux-gnu-ld.bfd' >> suppr.txt
#go test -asan -v ./...
go test -v ./...

0 comments on commit f9fcb2c

Please sign in to comment.