Closed as not planned
Description
Test Method
tar xf Python-3.9.9.tar.xz
cd Python-3.9.9
CFLAGS='-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link'
CXXFLAGS='-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++'
# Ignore memory leaks from python scripts invoked in the build
export ASAN_OPTIONS="detect_leaks=0"
export MSAN_OPTIONS="halt_on_error=0:exitcode=0:report_umrs=0"
# Remove -pthread from CFLAGS, this trips up ./configure
# which thinks pthreads are available without any CLI flags
CFLAGS=${CFLAGS//"-pthread"/}
./configure --disable-ipv6 --without-ensurepip --with-address-sanitizer
# We use altinstall to avoid having the Makefile create symlinks
make -j$(nproc)
python -m test --list-tests > tests
for t in $(cat tests); do
./python -m test.regrtest "${t}" -wW
done
Bug report
following test cases were found to have memory leak problem by asan:
test_concurrent_futures
test_crypt
test_embed
test_multiprocessing_fork
test_multiprocessing_forkserver
test_multiprocessing_spawn
test_support
test_thread
test_threading
test_tracemalloc
test_warnings
test_zipimport
See part of regrtest log in comment.
Your environment
- CPython versions tested on: 3.9.9
- Operating system and architecture:
localhost:~/rpmbuild/BUILD/Python-3.9.9 # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/10.3.1/lto-wrapper Target: aarch64-linux-gnu Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,lto --enable-plugin --enable-initfini-array --disable-libgcj --without-isl --without-cloog --enable-gnu-indirect-function --build=aarch64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --with-multilib-list=lp64 --enable-bolt Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.3.1 (GCC)