refactor: Add mem module to allow tests to override allocators.

This will allow us to do more interesting things with memory allocation
within toxcore, and allow fuzzers to explore various allocation failure
paths.
This commit is contained in:
iphydf
2023-08-23 10:26:11 +00:00
parent 6133fb1531
commit a549807df7
86 changed files with 1148 additions and 623 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ sudo apt-get install -y --no-install-recommends \
libopus-dev \
libsodium-dev \
libvpx-dev \
llvm-11 \
llvm-14 \
ninja-build
git clone --depth=1 https://github.com/ralight/mallocfail /tmp/mallocfail
cd /tmp/mallocfail # pushd
@@ -21,7 +21,7 @@ export CC=clang
export CXX=clang++
sudo install other/docker/coverage/run_mallocfail /usr/local/bin/run_mallocfail
(cd other/proxy && go build)
(cd other/proxy && go get && go build)
other/proxy/proxy &
. ".github/scripts/flags-coverage.sh"
@@ -58,4 +58,4 @@ cd - # popd
# --exclude testing \
# --gcov-options '\-lp'
bash <(curl -s https://codecov.io/bash) -x "llvm-cov-11 gcov"
bash <(curl -s https://codecov.io/bash) -x "llvm-cov-14 gcov"