mirror of
https://github.com/openssl/openssl.git
synced 2025-12-28 07:40:18 +08:00
test: add a sanity test for memory allocation functions
Some checks failed
GitHub CI / check_update (push) Has been cancelled
GitHub CI / check_docs (push) Has been cancelled
GitHub CI / check-c99 (push) Has been cancelled
GitHub CI / basic_gcc (push) Has been cancelled
GitHub CI / basic_clang (push) Has been cancelled
GitHub CI / linux-arm64 (push) Has been cancelled
GitHub CI / freebsd-x86_64 (push) Has been cancelled
GitHub CI / minimal (push) Has been cancelled
GitHub CI / no-deprecated (push) Has been cancelled
GitHub CI / no-shared-ubuntu (push) Has been cancelled
GitHub CI / no-shared-macos (macos-13) (push) Has been cancelled
GitHub CI / no-shared-macos (macos-14) (push) Has been cancelled
GitHub CI / non-caching (push) Has been cancelled
GitHub CI / address_ub_sanitizer (push) Has been cancelled
GitHub CI / fuzz_tests (push) Has been cancelled
GitHub CI / memory_sanitizer (push) Has been cancelled
GitHub CI / threads_sanitizer (push) Has been cancelled
GitHub CI / enable_non-default_options (push) Has been cancelled
GitHub CI / full_featured (push) Has been cancelled
GitHub CI / no-legacy (push) Has been cancelled
GitHub CI / legacy (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-ubuntu (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-macos (macos-13) (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-macos (macos-14) (push) Has been cancelled
GitHub CI / external-tests-misc (push) Has been cancelled
GitHub CI / external-tests-oqs-provider (push) Has been cancelled
GitHub CI / external-tests-pkcs11-provider (push) Has been cancelled
GitHub CI / external-tests-pyca (3.9) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-11 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-12 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-13 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-14 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-15 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-16 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-17 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-10 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-11 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-12 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-13 distro:ubuntu-22.04 gcc-ppa-name:ubuntu-toolchain-r/test]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-9 distro:ubuntu-22.04]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:aarch64-linux-gnu fips:no libs:libc6-dev-arm64-cross target:linux-aarch64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:alpha-linux-gnu fips:no libs:libc6.1-dev-alpha-cross target:linux-alpha-gcc]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:arm-linux-gnueabi fips:no libs:libc6-dev-armel-cross target:linux-armv4 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:arm-linux-gnueabihf fips:no libs:libc6-dev-armhf-cross target:linux-armv4 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:hppa-linux-gnu fips:no libs:libc6-dev-hppa-cross target:-static -O1 linux-generic32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:hppa-linux-gnu libs:libc6-dev-hppa-cross target:linux-generic32 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:i386-pc-msdosdjgpp libs:libc-djgpp-dev libwatt-djgpp-dev djgpp-utils ppa:jwt27/djgpp-toolchain target:no-threads 386 DJGPP tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:m68k-linux-gnu fips:no libs:libc6-dev-m68k-cross target:-static -m68040 linux-latomic -Wno-stringop-overflow tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:m68k-linux-gnu libs:libc6-dev-m68k-cross target:-mcfv4e -mxgot linux-latomic -Wno-stringop-overflow no-quic tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips-linux-gnu fips:no libs:libc6-dev-mips-cross target:-static linux-mips32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips-linux-gnu libs:libc6-dev-mips-cross target:linux-mips32 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips64-linux-gnuabi64 fips:no libs:libc6-dev-mips64-cross target:-static linux64-mips64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips64-linux-gnuabi64 libs:libc6-dev-mips64-cross target:linux64-mips64 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mipsel-linux-gnu fips:no libs:libc6-dev-mipsel-cross target:linux-mips32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:powerpc64le-linux-gnu fips:no libs:libc6-dev-ppc64el-cross target:linux-ppc64le]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross target:linux64-riscv64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:s390x-linux-gnu fips:no libs:libc6-dev-s390x-cross target:linux64-s390x]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:sh4-linux-gnu fips:no libs:libc6-dev-sh4-cross target:no-async linux-latomic tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:sparc64-linux-gnu libs:libc6-dev-sparc64-cross target:linux64-sparcv9 tests:none]) (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:afl-clang-fast config:enable-fuzz-afl no-module install:afl++ name:AFL]) (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:clang-18 config:enable-fuzz-libfuzzer enable-asan enable-ubsan -fno-sanitize=function -fsanitize-coverage=trace-cmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION extra:enable-fips enable-lms enable-ec_nistp_64_gcc_128 -fno-sanitize=al… (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:clang-18 config:enable-fuzz-libfuzzer enable-asan enable-ubsan -fno-sanitize=function install:libfuzzer-18-dev libs:--with-fuzzer-lib=/usr/lib/llvm-18/lib/libFuzzer.a --with-fuzzer-include=/usr/include/clang/18/include/fuzzer linke… (push) Has been cancelled
CIFuzz / Fuzzing (push) Has been cancelled
Perl-minimal-checker CI / perl-minimal-checker (push) Has been cancelled
Run-checker CI / run-checker (enable-trace enable-fips) (push) Has been cancelled
Run-checker CI / run-checker (no-cmp) (push) Has been cancelled
Run-checker CI / run-checker (no-cms) (push) Has been cancelled
Run-checker CI / run-checker (no-default-thread-pool) (push) Has been cancelled
Run-checker CI / run-checker (no-dgram) (push) Has been cancelled
Run-checker CI / run-checker (no-dh) (push) Has been cancelled
Run-checker CI / run-checker (no-dtls) (push) Has been cancelled
Run-checker CI / run-checker (no-ec) (push) Has been cancelled
Run-checker CI / run-checker (no-ecx) (push) Has been cancelled
Run-checker CI / run-checker (no-http) (push) Has been cancelled
Run-checker CI / run-checker (no-legacy) (push) Has been cancelled
Run-checker CI / run-checker (no-ml-dsa) (push) Has been cancelled
Run-checker CI / run-checker (no-ml-kem) (push) Has been cancelled
Run-checker CI / run-checker (no-quic) (push) Has been cancelled
Run-checker CI / run-checker (no-sm2) (push) Has been cancelled
Run-checker CI / run-checker (no-sock) (push) Has been cancelled
Run-checker CI / run-checker (no-stdio) (push) Has been cancelled
Run-checker CI / run-checker (no-thread-pool) (push) Has been cancelled
Run-checker CI / run-checker (no-threads) (push) Has been cancelled
Run-checker CI / run-checker (no-tls) (push) Has been cancelled
Run-checker CI / run-checker (no-tls1_2) (push) Has been cancelled
Run-checker CI / run-checker (no-tls1_3) (push) Has been cancelled
Run-checker CI / run-checker (no-ui) (push) Has been cancelled
Run-checker merge / run-checker (enable-asan enable-ubsan no-shared no-asm -DOPENSSL_SMALL_FOOTPRINT -fno-sanitize=function) (push) Has been cancelled
Run-checker merge / run-checker (enable-pie) (push) Has been cancelled
Run-checker merge / run-checker (enable-ubsan no-asm -DOPENSSL_SMALL_FOOTPRINT -fno-sanitize=function) (push) Has been cancelled
Run-checker merge / run-checker (enable-weak-ssl-ciphers) (push) Has been cancelled
Run-checker merge / run-checker (enable-zlib) (push) Has been cancelled
Run-checker merge / run-checker (no-dso) (push) Has been cancelled
Run-checker merge / run-checker (no-dynamic-engine) (push) Has been cancelled
Run-checker merge / run-checker (no-ec2m enable-fips) (push) Has been cancelled
Run-checker merge / run-checker (no-engine no-shared) (push) Has been cancelled
Run-checker merge / run-checker (no-err) (push) Has been cancelled
Run-checker merge / run-checker (no-filenames) (push) Has been cancelled
Run-checker merge / run-checker (no-integrity-only-ciphers) (push) Has been cancelled
Run-checker merge / run-checker (no-module) (push) Has been cancelled
Run-checker merge / run-checker (no-ocsp) (push) Has been cancelled
Run-checker merge / run-checker (no-pinshared) (push) Has been cancelled
Run-checker merge / run-checker (no-srp) (push) Has been cancelled
Run-checker merge / run-checker (no-srtp) (push) Has been cancelled
Run-checker merge / run-checker (no-ts) (push) Has been cancelled
Run-checker merge / jitter (push) Has been cancelled
Run-checker merge / threads_sanitizer_atomic_fallback (push) Has been cancelled
Windows GitHub CI / shared (map[arch:amd64 config:enable-lms enable-fips no-thread-pool no-quic os:windows-2025 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
Windows GitHub CI / shared (map[arch:amd64 config:enable-lms enable-fips os:windows-2022 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
Windows GitHub CI / shared (map[arch:x86 config:--strict-warnings no-fips enable-lms os:windows-2022 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat]) (push) Has been cancelled
Windows GitHub CI / plain (push) Has been cancelled
Windows GitHub CI / minimal (push) Has been cancelled
Windows GitHub CI / cygwin (windows-2022, map[arch:win64 config:-DCMAKE_C_COMPILER=gcc --strict-warnings enable-demos no-fips]) (push) Has been cancelled
Windows Compression GitHub CI / zstd (push) Has been cancelled
Windows Compression GitHub CI / brotli (push) Has been cancelled
Trigger docs.openssl.org deployment / trigger (push) Has been cancelled
Provider compatibility across versions / fips-releases (map[dir:openssl-3.0.0 tgz:openssl-3.0.0.tar.gz url:https://www.openssl.org/source/old/3.0/openssl-3.0.0.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / fips-releases (map[dir:openssl-3.0.8 tgz:openssl-3.0.8.tar.gz url:https://www.openssl.org/source/openssl-3.0.8.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / fips-releases (map[dir:openssl-3.0.9 tgz:openssl-3.0.9.tar.gz url:https://www.openssl.org/source/openssl-3.0.9.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / fips-releases (map[dir:openssl-3.1.2 tgz:openssl-3.1.2.tar.gz url:https://www.openssl.org/source/openssl-3.1.2.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.0 extra_config: name:openssl-3.0 tgz:branch-3.0.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.2 extra_config: name:openssl-3.2 tgz:branch-3.2.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.3 extra_config: name:openssl-3.3 tgz:branch-3.3.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.4 extra_config: name:openssl-3.4 tgz:branch-3.4.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.5 extra_config: name:openssl-3.5 tgz:branch-3.5.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-master extra_config:enable-lms name:master tgz:branch-master.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-master) (push) Has been cancelled
Coverage / define-matrix (push) Has been cancelled
Coverage / coverage (push) Has been cancelled
Static Analysis / coverity (push) Has been cancelled
Static Analysis On Prem / coverity-analysis (push) Has been cancelled
Run-checker daily / run-checker (-DOPENSSL_NO_BUILTIN_OVERFLOW_CHECKING) (push) Has been cancelled
Run-checker daily / run-checker (-DOPENSSL_PEDANTIC_ZEROIZATION enable-fips) (push) Has been cancelled
Run-checker daily / run-checker (-DOPENSSL_PEDANTIC_ZEROIZATION) (push) Has been cancelled
Run-checker daily / run-checker (-DOPENSSL_TLS_SECURITY_LEVEL=0) (push) Has been cancelled
Run-checker daily / run-checker (-DSSL3_ALIGN_PAYLOAD=4) (push) Has been cancelled
Run-checker daily / run-checker (386) (push) Has been cancelled
Run-checker daily / run-checker (enable-crypto-mdebug) (push) Has been cancelled
Run-checker daily / run-checker (enable-crypto-mdebug-backtrace) (push) Has been cancelled
Run-checker daily / run-checker (enable-demos) (push) Has been cancelled
Run-checker daily / run-checker (enable-ec_nistp_64_gcc_128) (push) Has been cancelled
Run-checker daily / run-checker (enable-egd) (push) Has been cancelled
Run-checker daily / run-checker (enable-fips enable-acvp-tests) (push) Has been cancelled
Run-checker daily / run-checker (enable-fips no-des no-dsa no-ec2m) (push) Has been cancelled
Run-checker daily / run-checker (enable-fips no-tls1_3) (push) Has been cancelled
Run-checker daily / run-checker (enable-fips) (push) Has been cancelled
Run-checker daily / run-checker (enable-h3demo) (push) Has been cancelled
Run-checker daily / run-checker (enable-heartbeats) (push) Has been cancelled
Run-checker daily / run-checker (enable-hqinterop) (push) Has been cancelled
Run-checker daily / run-checker (enable-lms) (push) Has been cancelled
Run-checker daily / run-checker (enable-md2) (push) Has been cancelled
Run-checker daily / run-checker (enable-rc5) (push) Has been cancelled
Run-checker daily / run-checker (enable-ssl3) (push) Has been cancelled
Run-checker daily / run-checker (enable-ssl3-method) (push) Has been cancelled
Run-checker daily / run-checker (enable-sslkeylog) (push) Has been cancelled
Run-checker daily / run-checker (enable-tfo) (push) Has been cancelled
Run-checker daily / run-checker (enable-trace) (push) Has been cancelled
Run-checker daily / run-checker (enable-unit-test) (push) Has been cancelled
Run-checker daily / run-checker (enable-zlib-dynamic) (push) Has been cancelled
Run-checker daily / run-checker (no-afalgeng) (push) Has been cancelled
Run-checker daily / run-checker (no-apps) (push) Has been cancelled
Run-checker daily / run-checker (no-aria) (push) Has been cancelled
Run-checker daily / run-checker (no-asan) (push) Has been cancelled
Run-checker daily / run-checker (no-asm) (push) Has been cancelled
Run-checker daily / run-checker (no-async) (push) Has been cancelled
Run-checker daily / run-checker (no-atexit) (push) Has been cancelled
Run-checker daily / run-checker (no-autoalginit) (push) Has been cancelled
Run-checker daily / run-checker (no-autoerrinit) (push) Has been cancelled
Run-checker daily / run-checker (no-autoload-config) (push) Has been cancelled
Run-checker daily / run-checker (no-bf) (push) Has been cancelled
Run-checker daily / run-checker (no-blake2) (push) Has been cancelled
Run-checker daily / run-checker (no-buildtest-c++) (push) Has been cancelled
Run-checker daily / run-checker (no-bulk) (push) Has been cancelled
Run-checker daily / run-checker (no-cached-fetch) (push) Has been cancelled
Run-checker daily / run-checker (no-camellia) (push) Has been cancelled
Run-checker daily / run-checker (no-capieng) (push) Has been cancelled
Run-checker daily / run-checker (no-cast) (push) Has been cancelled
Run-checker daily / run-checker (no-chacha) (push) Has been cancelled
Run-checker daily / run-checker (no-cmac) (push) Has been cancelled
Run-checker daily / run-checker (no-comp) (push) Has been cancelled
Run-checker daily / run-checker (no-ct) (push) Has been cancelled
Run-checker daily / run-checker (no-deprecated) (push) Has been cancelled
Run-checker daily / run-checker (no-des) (push) Has been cancelled
Run-checker daily / run-checker (no-docs) (push) Has been cancelled
Run-checker daily / run-checker (no-dsa) (push) Has been cancelled
Run-checker daily / run-checker (no-dtls1) (push) Has been cancelled
Run-checker daily / run-checker (no-dtls1-method) (push) Has been cancelled
Run-checker daily / run-checker (no-dtls1_2) (push) Has been cancelled
Run-checker daily / run-checker (no-dtls1_2-method) (push) Has been cancelled
Run-checker daily / run-checker (no-ecdh) (push) Has been cancelled
Run-checker daily / run-checker (no-ecdsa) (push) Has been cancelled
Run-checker daily / run-checker (no-engine) (push) Has been cancelled
Run-checker daily / run-checker (no-gost) (push) Has been cancelled
Run-checker daily / run-checker (no-hw) (push) Has been cancelled
Run-checker daily / run-checker (no-hw-padlock) (push) Has been cancelled
Run-checker daily / run-checker (no-idea) (push) Has been cancelled
Run-checker daily / run-checker (no-makedepend) (push) Has been cancelled
Run-checker daily / run-checker (no-md4) (push) Has been cancelled
Run-checker daily / run-checker (no-mdc2) (push) Has been cancelled
Run-checker daily / run-checker (no-msan) (push) Has been cancelled
Run-checker daily / run-checker (no-multiblock) (push) Has been cancelled
Run-checker daily / run-checker (no-nextprotoneg) (push) Has been cancelled
Run-checker daily / run-checker (no-ocb) (push) Has been cancelled
Run-checker daily / run-checker (no-padlockeng) (push) Has been cancelled
Run-checker daily / run-checker (no-pic) (push) Has been cancelled
Run-checker daily / run-checker (no-poly1305) (push) Has been cancelled
Run-checker daily / run-checker (no-posix-io) (push) Has been cancelled
Run-checker daily / run-checker (no-psk) (push) Has been cancelled
Run-checker daily / run-checker (no-rc2) (push) Has been cancelled
Run-checker daily / run-checker (no-rdrand) (push) Has been cancelled
Run-checker daily / run-checker (no-rfc3779) (push) Has been cancelled
Run-checker daily / run-checker (no-ripemd) (push) Has been cancelled
Run-checker daily / run-checker (no-rmd160) (push) Has been cancelled
Run-checker daily / run-checker (no-scrypt) (push) Has been cancelled
Run-checker daily / run-checker (no-secure-memory) (push) Has been cancelled
Run-checker daily / run-checker (no-seed) (push) Has been cancelled
Run-checker daily / run-checker (no-shared) (push) Has been cancelled
Run-checker daily / run-checker (no-siphash) (push) Has been cancelled
Run-checker daily / run-checker (no-siv) (push) Has been cancelled
Run-checker daily / run-checker (no-sm2-precomp) (push) Has been cancelled
Run-checker daily / run-checker (no-sm3) (push) Has been cancelled
Run-checker daily / run-checker (no-sm4) (push) Has been cancelled
Run-checker daily / run-checker (no-sock) (push) Has been cancelled
Run-checker daily / run-checker (no-sse2) (push) Has been cancelled
Run-checker daily / run-checker (no-ssl) (push) Has been cancelled
Run-checker daily / run-checker (no-ssl-trace) (push) Has been cancelled
Run-checker daily / run-checker (no-static-engine no-shared) (push) Has been cancelled
Run-checker daily / run-checker (no-tests) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1-method) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1_1) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1_1-method) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1_2-method) (push) Has been cancelled
Run-checker daily / run-checker (no-ubsan) (push) Has been cancelled
Run-checker daily / run-checker (no-ui-console) (push) Has been cancelled
Run-checker daily / run-checker (no-uplink) (push) Has been cancelled
Run-checker daily / run-checker (no-weak-ssl-ciphers) (push) Has been cancelled
Run-checker daily / run-checker (no-whirlpool) (push) Has been cancelled
Run-checker daily / run-checker-sctp (push) Has been cancelled
Run-checker daily / enable_brotli_dynamic (push) Has been cancelled
Run-checker daily / enable_zstd_dynamic (push) Has been cancelled
Run-checker daily / enable_brotli_and_zstd_dynamic (push) Has been cancelled
Run-checker daily / malloc_failure_testing (push) Has been cancelled
Run-checker daily / enable_brotli_and_asan_ubsan (push) Has been cancelled
Run-checker daily / enable_zstd_and_asan_ubsan (push) Has been cancelled
Run-checker daily / enable_tfo (macos-13) (push) Has been cancelled
Run-checker daily / enable_tfo (macos-14) (push) Has been cancelled
Run-checker daily / enable_tfo (ubuntu-latest) (push) Has been cancelled
Run-checker daily / enable_buildtest (push) Has been cancelled
Run-checker daily / memory_sanitizer_slh_dsa (push) Has been cancelled
Build openssl interop containers / update_quay_container (push) Has been cancelled
Build openssl interop containers / update_msquic_quay_container (push) Has been cancelled
OS Zoo CI / alpine (clang, edge) (push) Has been cancelled
OS Zoo CI / alpine (clang, latest) (push) Has been cancelled
OS Zoo CI / alpine (gcc, edge) (push) Has been cancelled
OS Zoo CI / alpine (gcc, latest) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/centos:8 install:sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \
dnf install -y gcc make… (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/debian:11 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/debian:12 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/debian:trixie install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/fedora:41 install:dnf install -y gcc make perl-core]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/fedora:42 install:dnf install -y gcc make perl-core]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/rockylinux:8 install:dnf install -y gcc make perl-core]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/rockylinux:9 install:dnf install -y gcc make perl-core]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/ubuntu:20.04 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/ubuntu:22.04 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/ubuntu:24.04 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / macos (macos-13) (push) Has been cancelled
OS Zoo CI / macos (macos-14) (push) Has been cancelled
OS Zoo CI / macos (macos-15) (push) Has been cancelled
OS Zoo CI / windows (map[os:windows-2022 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
OS Zoo CI / windows (map[os:windows-2025 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
OS Zoo CI / linux-arm64 (push) Has been cancelled
OS Zoo CI / linux-ppc64le (push) Has been cancelled
OS Zoo CI / linux-s390x (push) Has been cancelled
OS Zoo CI / linux-riscv64 (push) Has been cancelled
OS Zoo CI / freebsd-x86_64 (push) Has been cancelled
Interoperability tests with GnuTLS and NSS / test (gnutls) (push) Has been cancelled
Interoperability tests with GnuTLS and NSS / test (nss) (push) Has been cancelled
Some checks failed
GitHub CI / check_update (push) Has been cancelled
GitHub CI / check_docs (push) Has been cancelled
GitHub CI / check-c99 (push) Has been cancelled
GitHub CI / basic_gcc (push) Has been cancelled
GitHub CI / basic_clang (push) Has been cancelled
GitHub CI / linux-arm64 (push) Has been cancelled
GitHub CI / freebsd-x86_64 (push) Has been cancelled
GitHub CI / minimal (push) Has been cancelled
GitHub CI / no-deprecated (push) Has been cancelled
GitHub CI / no-shared-ubuntu (push) Has been cancelled
GitHub CI / no-shared-macos (macos-13) (push) Has been cancelled
GitHub CI / no-shared-macos (macos-14) (push) Has been cancelled
GitHub CI / non-caching (push) Has been cancelled
GitHub CI / address_ub_sanitizer (push) Has been cancelled
GitHub CI / fuzz_tests (push) Has been cancelled
GitHub CI / memory_sanitizer (push) Has been cancelled
GitHub CI / threads_sanitizer (push) Has been cancelled
GitHub CI / enable_non-default_options (push) Has been cancelled
GitHub CI / full_featured (push) Has been cancelled
GitHub CI / no-legacy (push) Has been cancelled
GitHub CI / legacy (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-ubuntu (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-macos (macos-13) (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-macos (macos-14) (push) Has been cancelled
GitHub CI / external-tests-misc (push) Has been cancelled
GitHub CI / external-tests-oqs-provider (push) Has been cancelled
GitHub CI / external-tests-pkcs11-provider (push) Has been cancelled
GitHub CI / external-tests-pyca (3.9) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-11 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-12 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-13 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-14 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-15 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-16 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-17 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-10 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-11 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-12 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-13 distro:ubuntu-22.04 gcc-ppa-name:ubuntu-toolchain-r/test]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-9 distro:ubuntu-22.04]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:aarch64-linux-gnu fips:no libs:libc6-dev-arm64-cross target:linux-aarch64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:alpha-linux-gnu fips:no libs:libc6.1-dev-alpha-cross target:linux-alpha-gcc]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:arm-linux-gnueabi fips:no libs:libc6-dev-armel-cross target:linux-armv4 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:arm-linux-gnueabihf fips:no libs:libc6-dev-armhf-cross target:linux-armv4 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:hppa-linux-gnu fips:no libs:libc6-dev-hppa-cross target:-static -O1 linux-generic32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:hppa-linux-gnu libs:libc6-dev-hppa-cross target:linux-generic32 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:i386-pc-msdosdjgpp libs:libc-djgpp-dev libwatt-djgpp-dev djgpp-utils ppa:jwt27/djgpp-toolchain target:no-threads 386 DJGPP tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:m68k-linux-gnu fips:no libs:libc6-dev-m68k-cross target:-static -m68040 linux-latomic -Wno-stringop-overflow tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:m68k-linux-gnu libs:libc6-dev-m68k-cross target:-mcfv4e -mxgot linux-latomic -Wno-stringop-overflow no-quic tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips-linux-gnu fips:no libs:libc6-dev-mips-cross target:-static linux-mips32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips-linux-gnu libs:libc6-dev-mips-cross target:linux-mips32 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips64-linux-gnuabi64 fips:no libs:libc6-dev-mips64-cross target:-static linux64-mips64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips64-linux-gnuabi64 libs:libc6-dev-mips64-cross target:linux64-mips64 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mipsel-linux-gnu fips:no libs:libc6-dev-mipsel-cross target:linux-mips32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:powerpc64le-linux-gnu fips:no libs:libc6-dev-ppc64el-cross target:linux-ppc64le]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross target:linux64-riscv64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:s390x-linux-gnu fips:no libs:libc6-dev-s390x-cross target:linux64-s390x]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:sh4-linux-gnu fips:no libs:libc6-dev-sh4-cross target:no-async linux-latomic tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:sparc64-linux-gnu libs:libc6-dev-sparc64-cross target:linux64-sparcv9 tests:none]) (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:afl-clang-fast config:enable-fuzz-afl no-module install:afl++ name:AFL]) (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:clang-18 config:enable-fuzz-libfuzzer enable-asan enable-ubsan -fno-sanitize=function -fsanitize-coverage=trace-cmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION extra:enable-fips enable-lms enable-ec_nistp_64_gcc_128 -fno-sanitize=al… (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:clang-18 config:enable-fuzz-libfuzzer enable-asan enable-ubsan -fno-sanitize=function install:libfuzzer-18-dev libs:--with-fuzzer-lib=/usr/lib/llvm-18/lib/libFuzzer.a --with-fuzzer-include=/usr/include/clang/18/include/fuzzer linke… (push) Has been cancelled
CIFuzz / Fuzzing (push) Has been cancelled
Perl-minimal-checker CI / perl-minimal-checker (push) Has been cancelled
Run-checker CI / run-checker (enable-trace enable-fips) (push) Has been cancelled
Run-checker CI / run-checker (no-cmp) (push) Has been cancelled
Run-checker CI / run-checker (no-cms) (push) Has been cancelled
Run-checker CI / run-checker (no-default-thread-pool) (push) Has been cancelled
Run-checker CI / run-checker (no-dgram) (push) Has been cancelled
Run-checker CI / run-checker (no-dh) (push) Has been cancelled
Run-checker CI / run-checker (no-dtls) (push) Has been cancelled
Run-checker CI / run-checker (no-ec) (push) Has been cancelled
Run-checker CI / run-checker (no-ecx) (push) Has been cancelled
Run-checker CI / run-checker (no-http) (push) Has been cancelled
Run-checker CI / run-checker (no-legacy) (push) Has been cancelled
Run-checker CI / run-checker (no-ml-dsa) (push) Has been cancelled
Run-checker CI / run-checker (no-ml-kem) (push) Has been cancelled
Run-checker CI / run-checker (no-quic) (push) Has been cancelled
Run-checker CI / run-checker (no-sm2) (push) Has been cancelled
Run-checker CI / run-checker (no-sock) (push) Has been cancelled
Run-checker CI / run-checker (no-stdio) (push) Has been cancelled
Run-checker CI / run-checker (no-thread-pool) (push) Has been cancelled
Run-checker CI / run-checker (no-threads) (push) Has been cancelled
Run-checker CI / run-checker (no-tls) (push) Has been cancelled
Run-checker CI / run-checker (no-tls1_2) (push) Has been cancelled
Run-checker CI / run-checker (no-tls1_3) (push) Has been cancelled
Run-checker CI / run-checker (no-ui) (push) Has been cancelled
Run-checker merge / run-checker (enable-asan enable-ubsan no-shared no-asm -DOPENSSL_SMALL_FOOTPRINT -fno-sanitize=function) (push) Has been cancelled
Run-checker merge / run-checker (enable-pie) (push) Has been cancelled
Run-checker merge / run-checker (enable-ubsan no-asm -DOPENSSL_SMALL_FOOTPRINT -fno-sanitize=function) (push) Has been cancelled
Run-checker merge / run-checker (enable-weak-ssl-ciphers) (push) Has been cancelled
Run-checker merge / run-checker (enable-zlib) (push) Has been cancelled
Run-checker merge / run-checker (no-dso) (push) Has been cancelled
Run-checker merge / run-checker (no-dynamic-engine) (push) Has been cancelled
Run-checker merge / run-checker (no-ec2m enable-fips) (push) Has been cancelled
Run-checker merge / run-checker (no-engine no-shared) (push) Has been cancelled
Run-checker merge / run-checker (no-err) (push) Has been cancelled
Run-checker merge / run-checker (no-filenames) (push) Has been cancelled
Run-checker merge / run-checker (no-integrity-only-ciphers) (push) Has been cancelled
Run-checker merge / run-checker (no-module) (push) Has been cancelled
Run-checker merge / run-checker (no-ocsp) (push) Has been cancelled
Run-checker merge / run-checker (no-pinshared) (push) Has been cancelled
Run-checker merge / run-checker (no-srp) (push) Has been cancelled
Run-checker merge / run-checker (no-srtp) (push) Has been cancelled
Run-checker merge / run-checker (no-ts) (push) Has been cancelled
Run-checker merge / jitter (push) Has been cancelled
Run-checker merge / threads_sanitizer_atomic_fallback (push) Has been cancelled
Windows GitHub CI / shared (map[arch:amd64 config:enable-lms enable-fips no-thread-pool no-quic os:windows-2025 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
Windows GitHub CI / shared (map[arch:amd64 config:enable-lms enable-fips os:windows-2022 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
Windows GitHub CI / shared (map[arch:x86 config:--strict-warnings no-fips enable-lms os:windows-2022 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat]) (push) Has been cancelled
Windows GitHub CI / plain (push) Has been cancelled
Windows GitHub CI / minimal (push) Has been cancelled
Windows GitHub CI / cygwin (windows-2022, map[arch:win64 config:-DCMAKE_C_COMPILER=gcc --strict-warnings enable-demos no-fips]) (push) Has been cancelled
Windows Compression GitHub CI / zstd (push) Has been cancelled
Windows Compression GitHub CI / brotli (push) Has been cancelled
Trigger docs.openssl.org deployment / trigger (push) Has been cancelled
Provider compatibility across versions / fips-releases (map[dir:openssl-3.0.0 tgz:openssl-3.0.0.tar.gz url:https://www.openssl.org/source/old/3.0/openssl-3.0.0.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / fips-releases (map[dir:openssl-3.0.8 tgz:openssl-3.0.8.tar.gz url:https://www.openssl.org/source/openssl-3.0.8.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / fips-releases (map[dir:openssl-3.0.9 tgz:openssl-3.0.9.tar.gz url:https://www.openssl.org/source/openssl-3.0.9.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / fips-releases (map[dir:openssl-3.1.2 tgz:openssl-3.1.2.tar.gz url:https://www.openssl.org/source/openssl-3.1.2.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.0 extra_config: name:openssl-3.0 tgz:branch-3.0.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.2 extra_config: name:openssl-3.2 tgz:branch-3.2.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.3 extra_config: name:openssl-3.3 tgz:branch-3.3.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.4 extra_config: name:openssl-3.4 tgz:branch-3.4.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-3.5 extra_config: name:openssl-3.5 tgz:branch-3.5.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / development-branches (map[dir:branch-master extra_config:enable-lms name:master tgz:branch-master.tar.gz]) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.0, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.2, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.3, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.4, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-3.5, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (branch-master, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.0, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.8, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.0.9, branch-master) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.0) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.2) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.3) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.4) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-3.5) (push) Has been cancelled
Provider compatibility across versions / cross-testing (openssl-3.1.2, branch-master) (push) Has been cancelled
Coverage / define-matrix (push) Has been cancelled
Coverage / coverage (push) Has been cancelled
Static Analysis / coverity (push) Has been cancelled
Static Analysis On Prem / coverity-analysis (push) Has been cancelled
Run-checker daily / run-checker (-DOPENSSL_NO_BUILTIN_OVERFLOW_CHECKING) (push) Has been cancelled
Run-checker daily / run-checker (-DOPENSSL_PEDANTIC_ZEROIZATION enable-fips) (push) Has been cancelled
Run-checker daily / run-checker (-DOPENSSL_PEDANTIC_ZEROIZATION) (push) Has been cancelled
Run-checker daily / run-checker (-DOPENSSL_TLS_SECURITY_LEVEL=0) (push) Has been cancelled
Run-checker daily / run-checker (-DSSL3_ALIGN_PAYLOAD=4) (push) Has been cancelled
Run-checker daily / run-checker (386) (push) Has been cancelled
Run-checker daily / run-checker (enable-crypto-mdebug) (push) Has been cancelled
Run-checker daily / run-checker (enable-crypto-mdebug-backtrace) (push) Has been cancelled
Run-checker daily / run-checker (enable-demos) (push) Has been cancelled
Run-checker daily / run-checker (enable-ec_nistp_64_gcc_128) (push) Has been cancelled
Run-checker daily / run-checker (enable-egd) (push) Has been cancelled
Run-checker daily / run-checker (enable-fips enable-acvp-tests) (push) Has been cancelled
Run-checker daily / run-checker (enable-fips no-des no-dsa no-ec2m) (push) Has been cancelled
Run-checker daily / run-checker (enable-fips no-tls1_3) (push) Has been cancelled
Run-checker daily / run-checker (enable-fips) (push) Has been cancelled
Run-checker daily / run-checker (enable-h3demo) (push) Has been cancelled
Run-checker daily / run-checker (enable-heartbeats) (push) Has been cancelled
Run-checker daily / run-checker (enable-hqinterop) (push) Has been cancelled
Run-checker daily / run-checker (enable-lms) (push) Has been cancelled
Run-checker daily / run-checker (enable-md2) (push) Has been cancelled
Run-checker daily / run-checker (enable-rc5) (push) Has been cancelled
Run-checker daily / run-checker (enable-ssl3) (push) Has been cancelled
Run-checker daily / run-checker (enable-ssl3-method) (push) Has been cancelled
Run-checker daily / run-checker (enable-sslkeylog) (push) Has been cancelled
Run-checker daily / run-checker (enable-tfo) (push) Has been cancelled
Run-checker daily / run-checker (enable-trace) (push) Has been cancelled
Run-checker daily / run-checker (enable-unit-test) (push) Has been cancelled
Run-checker daily / run-checker (enable-zlib-dynamic) (push) Has been cancelled
Run-checker daily / run-checker (no-afalgeng) (push) Has been cancelled
Run-checker daily / run-checker (no-apps) (push) Has been cancelled
Run-checker daily / run-checker (no-aria) (push) Has been cancelled
Run-checker daily / run-checker (no-asan) (push) Has been cancelled
Run-checker daily / run-checker (no-asm) (push) Has been cancelled
Run-checker daily / run-checker (no-async) (push) Has been cancelled
Run-checker daily / run-checker (no-atexit) (push) Has been cancelled
Run-checker daily / run-checker (no-autoalginit) (push) Has been cancelled
Run-checker daily / run-checker (no-autoerrinit) (push) Has been cancelled
Run-checker daily / run-checker (no-autoload-config) (push) Has been cancelled
Run-checker daily / run-checker (no-bf) (push) Has been cancelled
Run-checker daily / run-checker (no-blake2) (push) Has been cancelled
Run-checker daily / run-checker (no-buildtest-c++) (push) Has been cancelled
Run-checker daily / run-checker (no-bulk) (push) Has been cancelled
Run-checker daily / run-checker (no-cached-fetch) (push) Has been cancelled
Run-checker daily / run-checker (no-camellia) (push) Has been cancelled
Run-checker daily / run-checker (no-capieng) (push) Has been cancelled
Run-checker daily / run-checker (no-cast) (push) Has been cancelled
Run-checker daily / run-checker (no-chacha) (push) Has been cancelled
Run-checker daily / run-checker (no-cmac) (push) Has been cancelled
Run-checker daily / run-checker (no-comp) (push) Has been cancelled
Run-checker daily / run-checker (no-ct) (push) Has been cancelled
Run-checker daily / run-checker (no-deprecated) (push) Has been cancelled
Run-checker daily / run-checker (no-des) (push) Has been cancelled
Run-checker daily / run-checker (no-docs) (push) Has been cancelled
Run-checker daily / run-checker (no-dsa) (push) Has been cancelled
Run-checker daily / run-checker (no-dtls1) (push) Has been cancelled
Run-checker daily / run-checker (no-dtls1-method) (push) Has been cancelled
Run-checker daily / run-checker (no-dtls1_2) (push) Has been cancelled
Run-checker daily / run-checker (no-dtls1_2-method) (push) Has been cancelled
Run-checker daily / run-checker (no-ecdh) (push) Has been cancelled
Run-checker daily / run-checker (no-ecdsa) (push) Has been cancelled
Run-checker daily / run-checker (no-engine) (push) Has been cancelled
Run-checker daily / run-checker (no-gost) (push) Has been cancelled
Run-checker daily / run-checker (no-hw) (push) Has been cancelled
Run-checker daily / run-checker (no-hw-padlock) (push) Has been cancelled
Run-checker daily / run-checker (no-idea) (push) Has been cancelled
Run-checker daily / run-checker (no-makedepend) (push) Has been cancelled
Run-checker daily / run-checker (no-md4) (push) Has been cancelled
Run-checker daily / run-checker (no-mdc2) (push) Has been cancelled
Run-checker daily / run-checker (no-msan) (push) Has been cancelled
Run-checker daily / run-checker (no-multiblock) (push) Has been cancelled
Run-checker daily / run-checker (no-nextprotoneg) (push) Has been cancelled
Run-checker daily / run-checker (no-ocb) (push) Has been cancelled
Run-checker daily / run-checker (no-padlockeng) (push) Has been cancelled
Run-checker daily / run-checker (no-pic) (push) Has been cancelled
Run-checker daily / run-checker (no-poly1305) (push) Has been cancelled
Run-checker daily / run-checker (no-posix-io) (push) Has been cancelled
Run-checker daily / run-checker (no-psk) (push) Has been cancelled
Run-checker daily / run-checker (no-rc2) (push) Has been cancelled
Run-checker daily / run-checker (no-rdrand) (push) Has been cancelled
Run-checker daily / run-checker (no-rfc3779) (push) Has been cancelled
Run-checker daily / run-checker (no-ripemd) (push) Has been cancelled
Run-checker daily / run-checker (no-rmd160) (push) Has been cancelled
Run-checker daily / run-checker (no-scrypt) (push) Has been cancelled
Run-checker daily / run-checker (no-secure-memory) (push) Has been cancelled
Run-checker daily / run-checker (no-seed) (push) Has been cancelled
Run-checker daily / run-checker (no-shared) (push) Has been cancelled
Run-checker daily / run-checker (no-siphash) (push) Has been cancelled
Run-checker daily / run-checker (no-siv) (push) Has been cancelled
Run-checker daily / run-checker (no-sm2-precomp) (push) Has been cancelled
Run-checker daily / run-checker (no-sm3) (push) Has been cancelled
Run-checker daily / run-checker (no-sm4) (push) Has been cancelled
Run-checker daily / run-checker (no-sock) (push) Has been cancelled
Run-checker daily / run-checker (no-sse2) (push) Has been cancelled
Run-checker daily / run-checker (no-ssl) (push) Has been cancelled
Run-checker daily / run-checker (no-ssl-trace) (push) Has been cancelled
Run-checker daily / run-checker (no-static-engine no-shared) (push) Has been cancelled
Run-checker daily / run-checker (no-tests) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1-method) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1_1) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1_1-method) (push) Has been cancelled
Run-checker daily / run-checker (no-tls1_2-method) (push) Has been cancelled
Run-checker daily / run-checker (no-ubsan) (push) Has been cancelled
Run-checker daily / run-checker (no-ui-console) (push) Has been cancelled
Run-checker daily / run-checker (no-uplink) (push) Has been cancelled
Run-checker daily / run-checker (no-weak-ssl-ciphers) (push) Has been cancelled
Run-checker daily / run-checker (no-whirlpool) (push) Has been cancelled
Run-checker daily / run-checker-sctp (push) Has been cancelled
Run-checker daily / enable_brotli_dynamic (push) Has been cancelled
Run-checker daily / enable_zstd_dynamic (push) Has been cancelled
Run-checker daily / enable_brotli_and_zstd_dynamic (push) Has been cancelled
Run-checker daily / malloc_failure_testing (push) Has been cancelled
Run-checker daily / enable_brotli_and_asan_ubsan (push) Has been cancelled
Run-checker daily / enable_zstd_and_asan_ubsan (push) Has been cancelled
Run-checker daily / enable_tfo (macos-13) (push) Has been cancelled
Run-checker daily / enable_tfo (macos-14) (push) Has been cancelled
Run-checker daily / enable_tfo (ubuntu-latest) (push) Has been cancelled
Run-checker daily / enable_buildtest (push) Has been cancelled
Run-checker daily / memory_sanitizer_slh_dsa (push) Has been cancelled
Build openssl interop containers / update_quay_container (push) Has been cancelled
Build openssl interop containers / update_msquic_quay_container (push) Has been cancelled
OS Zoo CI / alpine (clang, edge) (push) Has been cancelled
OS Zoo CI / alpine (clang, latest) (push) Has been cancelled
OS Zoo CI / alpine (gcc, edge) (push) Has been cancelled
OS Zoo CI / alpine (gcc, latest) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/centos:8 install:sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \
dnf install -y gcc make… (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/debian:11 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/debian:12 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/debian:trixie install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/fedora:41 install:dnf install -y gcc make perl-core]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/fedora:42 install:dnf install -y gcc make perl-core]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/rockylinux:8 install:dnf install -y gcc make perl-core]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/rockylinux:9 install:dnf install -y gcc make perl-core]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/ubuntu:20.04 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/ubuntu:22.04 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / linux (map[image:docker.io/library/ubuntu:24.04 install:apt-get update && apt-get install -y gcc make perl]) (push) Has been cancelled
OS Zoo CI / macos (macos-13) (push) Has been cancelled
OS Zoo CI / macos (macos-14) (push) Has been cancelled
OS Zoo CI / macos (macos-15) (push) Has been cancelled
OS Zoo CI / windows (map[os:windows-2022 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
OS Zoo CI / windows (map[os:windows-2025 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
OS Zoo CI / linux-arm64 (push) Has been cancelled
OS Zoo CI / linux-ppc64le (push) Has been cancelled
OS Zoo CI / linux-s390x (push) Has been cancelled
OS Zoo CI / linux-riscv64 (push) Has been cancelled
OS Zoo CI / freebsd-x86_64 (push) Has been cancelled
Interoperability tests with GnuTLS and NSS / test (gnutls) (push) Has been cancelled
Interoperability tests with GnuTLS and NSS / test (nss) (push) Has been cancelled
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/28059)
This commit is contained in:
committed by
Neil Horman
parent
39029a1bb0
commit
d090695101
@@ -1238,6 +1238,16 @@ IF[{- !$disabled{tests} -}]
|
||||
INCLUDE[bio_prefix_text]=.. ../include ../apps/include
|
||||
DEPEND[bio_prefix_text]=../libcrypto libtestutil.a
|
||||
|
||||
PROGRAMS{noinst}=mem_alloc_test
|
||||
SOURCE[mem_alloc_test]=mem_alloc_test.c
|
||||
INCLUDE[mem_alloc_test]=../include ../apps/include
|
||||
DEPEND[mem_alloc_test]=../libcrypto libtestutil.a
|
||||
|
||||
PROGRAMS{noinst}=mem_alloc_custom_fns_test
|
||||
SOURCE[mem_alloc_custom_fns_test]=mem_alloc_custom_fns_test.c
|
||||
INCLUDE[mem_alloc_custom_fns_test]=../include ../apps/include
|
||||
DEPEND[mem_alloc_custom_fns_test]=../libcrypto libtestutil.a
|
||||
|
||||
IF[{- !$disabled{'deprecated-3.0'} -}]
|
||||
PROGRAMS{noinst}=pem_read_depr_test
|
||||
SOURCE[pem_read_depr_test]=pem_read_depr_test.c
|
||||
|
||||
2
test/mem_alloc_custom_fns_test.c
Normal file
2
test/mem_alloc_custom_fns_test.c
Normal file
@@ -0,0 +1,2 @@
|
||||
#define USE_CUSTOM_ALLOC_FNS 1
|
||||
#include "mem_alloc_test.c"
|
||||
869
test/mem_alloc_test.c
Normal file
869
test/mem_alloc_test.c
Normal file
@@ -0,0 +1,869 @@
|
||||
/*
|
||||
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/types.h>
|
||||
#include "testutil.h"
|
||||
|
||||
#ifndef USE_CUSTOM_ALLOC_FNS
|
||||
# define USE_CUSTOM_ALLOC_FNS 0
|
||||
#endif
|
||||
|
||||
/* Change to 1 to see every call of the custom allocator functions */
|
||||
#define CUSTOM_FN_PRINT_CALLS 0
|
||||
|
||||
enum exp_ret_flags { EXP_FAIL = 0x10 };
|
||||
|
||||
enum exp_ret {
|
||||
/** Expecting success */
|
||||
EXP_NONNULL,
|
||||
/** Zero-size special case: can either return NULL or a special pointer */
|
||||
EXP_ZERO_SIZE,
|
||||
/** Expecting an error due to insufficient memory */
|
||||
EXP_OOM = EXP_FAIL,
|
||||
/** Expecting error due to invalid arguments */
|
||||
EXP_INVAL,
|
||||
/** Expecting error due to integer overflow */
|
||||
EXP_INT_OF,
|
||||
};
|
||||
|
||||
#define IS_FAIL(exp_) (!!((int) (exp) & (int) EXP_FAIL))
|
||||
|
||||
static const char test_fn[] = "test_file_name";
|
||||
enum { test_line = 31415926 };
|
||||
|
||||
#define SQRT_SIZE_T ((size_t) 1 << (sizeof(size_t) * (CHAR_BIT / 2)))
|
||||
#define SQSQRT_SIZE_T ((size_t) 1 << (sizeof(size_t) * (CHAR_BIT / 4)))
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
#if !defined(OPENSSL_NO_CRYPTO_MDEBUG) || USE_CUSTOM_ALLOC_FNS
|
||||
struct call_counts {
|
||||
int malloc;
|
||||
int realloc;
|
||||
int free;
|
||||
};
|
||||
#endif
|
||||
#if !defined(OPENSSL_NO_CRYPTO_MDEBUG)
|
||||
static struct call_counts mdebug_counts;
|
||||
#endif
|
||||
#if USE_CUSTOM_ALLOC_FNS
|
||||
static struct call_counts saved_custom_counts, cur_custom_counts;
|
||||
#endif
|
||||
|
||||
static const struct array_alloc_vector {
|
||||
size_t nmemb;
|
||||
size_t size;
|
||||
enum exp_ret exp_malloc;
|
||||
enum exp_ret exp_calloc;
|
||||
} array_alloc_vectors[] = {
|
||||
{ 0, 0, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 1, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, SQRT_SIZE_T - 1, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, SQRT_SIZE_T, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, SIZE_MAX, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 1, 0, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ SQRT_SIZE_T - 1, 0, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ SIZE_MAX, 0, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
|
||||
{ 1, 1, EXP_NONNULL, EXP_NONNULL },
|
||||
|
||||
{ SQRT_SIZE_T / 2, SQRT_SIZE_T, EXP_OOM, EXP_OOM },
|
||||
|
||||
{ SQRT_SIZE_T, SQRT_SIZE_T, EXP_ZERO_SIZE, EXP_INT_OF },
|
||||
|
||||
/* Some magic numbers */
|
||||
#if SIZE_MAX == 4294967295U
|
||||
{ 641, 6700417, EXP_NONNULL, EXP_INT_OF },
|
||||
#else /* Of course there are no archutectures other than 32- and 64-bit ones */
|
||||
{ 274177, 67280421310721LLU, EXP_NONNULL, EXP_INT_OF },
|
||||
#endif
|
||||
|
||||
{ SIZE_MAX / 4 * 3, SIZE_MAX / 2, EXP_OOM, EXP_INT_OF },
|
||||
};
|
||||
|
||||
static const struct array_realloc_vector {
|
||||
size_t size;
|
||||
size_t orig_nmemb;
|
||||
size_t new_nmemb;
|
||||
enum exp_ret exp_orig;
|
||||
enum exp_ret exp_new;
|
||||
enum exp_ret exp_orig_array;
|
||||
enum exp_ret exp_new_array;
|
||||
} array_realloc_vectors[] = {
|
||||
{ 0, 0, 0,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 0, 1,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 0, SIZE_MAX,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 1, 0,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, SIZE_MAX, 0,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 1, SIZE_MAX,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, SIZE_MAX, 1,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, SIZE_MAX, SIZE_MAX,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
|
||||
{ 1, 0, 0,
|
||||
EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 1, 0, 1,
|
||||
EXP_ZERO_SIZE, EXP_NONNULL, EXP_ZERO_SIZE, EXP_NONNULL },
|
||||
{ 1, 0, SIZE_MAX,
|
||||
EXP_ZERO_SIZE, EXP_OOM, EXP_ZERO_SIZE, EXP_OOM },
|
||||
{ 1, 1, 0,
|
||||
EXP_NONNULL, EXP_ZERO_SIZE, EXP_NONNULL, EXP_ZERO_SIZE },
|
||||
{ 1, SIZE_MAX, 0,
|
||||
EXP_OOM, EXP_ZERO_SIZE, EXP_OOM, EXP_ZERO_SIZE },
|
||||
|
||||
{ 1, 123, 345,
|
||||
EXP_NONNULL, EXP_NONNULL, EXP_NONNULL, EXP_NONNULL },
|
||||
{ 1, 345, 123,
|
||||
EXP_NONNULL, EXP_NONNULL, EXP_NONNULL, EXP_NONNULL },
|
||||
{ 12, 34, 56,
|
||||
EXP_NONNULL, EXP_NONNULL, EXP_NONNULL, EXP_NONNULL },
|
||||
{ 12, 56, 34,
|
||||
EXP_NONNULL, EXP_NONNULL, EXP_NONNULL, EXP_NONNULL },
|
||||
|
||||
{ SQSQRT_SIZE_T, SIZE_MAX / SQSQRT_SIZE_T + 1, SIZE_MAX / SQSQRT_SIZE_T + 2,
|
||||
EXP_ZERO_SIZE, EXP_NONNULL, EXP_INT_OF, EXP_INT_OF },
|
||||
{ SQSQRT_SIZE_T, SIZE_MAX / SQSQRT_SIZE_T + 2, SIZE_MAX / SQSQRT_SIZE_T + 1,
|
||||
EXP_NONNULL, EXP_ZERO_SIZE, EXP_INT_OF, EXP_INT_OF },
|
||||
|
||||
{ 123, 12, SIZE_MAX / 123 + 12,
|
||||
EXP_NONNULL, EXP_NONNULL, EXP_NONNULL, EXP_INT_OF },
|
||||
{ 123, SIZE_MAX / 123 + 12, 12,
|
||||
EXP_NONNULL, EXP_NONNULL, EXP_INT_OF, EXP_NONNULL },
|
||||
};
|
||||
|
||||
static const struct array_aligned_alloc_vector {
|
||||
size_t nmemb;
|
||||
size_t size;
|
||||
size_t align;
|
||||
enum exp_ret exp;
|
||||
enum exp_ret exp_array;
|
||||
} array_aligned_alloc_vectors[] = {
|
||||
{ 0, 0, 0, EXP_INVAL, EXP_INVAL },
|
||||
{ 0, 0, 1, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 0, 2, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 0, 3, EXP_INVAL, EXP_INVAL },
|
||||
{ 0, 0, 4, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 0, 64, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
{ 0, 0, SQSQRT_SIZE_T, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
/*
|
||||
* This one gets mem_alloc_custom_fns_test killed with SIGKILL
|
||||
* on the linux-arm64 github runner.
|
||||
*/
|
||||
/* { 0, 0, SQRT_SIZE_T, EXP_ZERO_SIZE, EXP_ZERO_SIZE }, */
|
||||
|
||||
{ 0, 0, 64, EXP_ZERO_SIZE, EXP_ZERO_SIZE },
|
||||
|
||||
{ 8, 8, 63, EXP_INVAL, EXP_INVAL },
|
||||
{ 8, 8, 64, EXP_NONNULL, EXP_NONNULL },
|
||||
{ SIZE_MAX / 8 + 9, 8, 64, EXP_NONNULL, EXP_INT_OF },
|
||||
|
||||
/*
|
||||
* posix_memalign expected to fail with ENOMEM, while the open-coded
|
||||
* implementation tries to alloc size + alignment, which should fail
|
||||
* on integer overflow.
|
||||
*/
|
||||
{ 1, SIZE_MAX / 2 + 2, SIZE_MAX / 2 + 1,
|
||||
#if (defined(_BSD_SOURCE) \
|
||||
|| (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)) \
|
||||
&& !USE_CUSTOM_ALLOC_FNS || defined(OPENSSL_SMALL_FOOTPRINT)
|
||||
EXP_OOM, EXP_OOM
|
||||
#else
|
||||
EXP_INT_OF, EXP_INT_OF
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
||||
static int secure_memory_is_secure;
|
||||
|
||||
#if USE_CUSTOM_ALLOC_FNS
|
||||
static void *my_malloc(const size_t num,
|
||||
const char * const file, const int line)
|
||||
{
|
||||
void * const p = malloc(num);
|
||||
|
||||
# if CUSTOM_FN_PRINT_CALLS
|
||||
if (file == test_fn || file == NULL
|
||||
|| (strcmp(file, OPENSSL_FILE) == 0 && file[0] != '\0'))
|
||||
TEST_note("[%s:%d]: malloc(%#zx) -> %p", file, line, num, p);
|
||||
# endif
|
||||
|
||||
if (cur_custom_counts.malloc < INT_MAX)
|
||||
cur_custom_counts.malloc++;
|
||||
|
||||
return p;
|
||||
}
|
||||
static void *my_realloc(void * const addr, const size_t num,
|
||||
const char * const file, const int line)
|
||||
{
|
||||
# if CUSTOM_FN_PRINT_CALLS
|
||||
const uintptr_t old_addr = (uintptr_t) addr;
|
||||
# endif
|
||||
void * const p = realloc(addr, num);
|
||||
|
||||
# if CUSTOM_FN_PRINT_CALLS
|
||||
if (file == test_fn || file == NULL
|
||||
|| (strcmp(file, OPENSSL_FILE) == 0 && file[0] != '\0'))
|
||||
TEST_note("[%s:%d]: realloc(%#" PRIxPTR ", %#zx) -> %p",
|
||||
file, line, old_addr, num, p);
|
||||
# endif
|
||||
|
||||
if (cur_custom_counts.realloc < INT_MAX)
|
||||
cur_custom_counts.realloc++;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static void my_free(void * const addr, const char * const file, const int line)
|
||||
{
|
||||
# if CUSTOM_FN_PRINT_CALLS
|
||||
if (file == test_fn || file == NULL
|
||||
|| (strcmp(file, OPENSSL_FILE) == 0 && file[0] != '\0'))
|
||||
TEST_note("[%s:%d]: free(%p)", file, line, addr);
|
||||
# endif
|
||||
|
||||
if (cur_custom_counts.free < INT_MAX)
|
||||
cur_custom_counts.free++;
|
||||
|
||||
free(addr);
|
||||
}
|
||||
#endif /* USE_CUSTOM_ALLOC_FNS */
|
||||
|
||||
static bool check_zero_mem(char *p, size_t sz)
|
||||
{
|
||||
for (size_t i = 0; i < sz; i++) {
|
||||
if (p[i] != 0) {
|
||||
TEST_error("Non-zero byte %zu of %zu (%#04hhx)", i, sz, p[i]);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void save_counts(void)
|
||||
{
|
||||
#if !defined(OPENSSL_NO_CRYPTO_MDEBUG)
|
||||
CRYPTO_get_alloc_counts(&mdebug_counts.malloc,
|
||||
&mdebug_counts.realloc,
|
||||
&mdebug_counts.free);
|
||||
#endif
|
||||
|
||||
#if USE_CUSTOM_ALLOC_FNS
|
||||
saved_custom_counts = cur_custom_counts;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void check_exp_prep(void)
|
||||
{
|
||||
ERR_set_mark();
|
||||
|
||||
save_counts();
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieve fresh call counts and check against the expected ones,
|
||||
* when the latter are no less than zero.
|
||||
*/
|
||||
static bool check_counts(int exp_mallocs, int exp_reallocs, int exp_frees)
|
||||
{
|
||||
int test_result = 1;
|
||||
|
||||
#if !defined(OPENSSL_NO_CRYPTO_MDEBUG)
|
||||
{
|
||||
struct call_counts cur;
|
||||
|
||||
CRYPTO_get_alloc_counts(&cur.malloc, &cur.realloc, &cur.free);
|
||||
if (exp_mallocs >= 0
|
||||
&& !TEST_int_eq(cur.malloc - mdebug_counts.malloc, exp_mallocs))
|
||||
test_result = 0;
|
||||
if (exp_reallocs >= 0
|
||||
&& !TEST_int_eq(cur.realloc - mdebug_counts.realloc, exp_reallocs))
|
||||
test_result = 0;
|
||||
if (exp_frees >= 0
|
||||
&& !TEST_int_eq(cur.free - mdebug_counts.free, exp_frees))
|
||||
test_result = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if USE_CUSTOM_ALLOC_FNS
|
||||
if (exp_mallocs >= 0
|
||||
&& !TEST_int_eq(cur_custom_counts.malloc - saved_custom_counts.malloc,
|
||||
exp_mallocs))
|
||||
test_result = 0;
|
||||
if (exp_reallocs >= 0
|
||||
&& !TEST_int_eq(cur_custom_counts.realloc - saved_custom_counts.realloc,
|
||||
exp_reallocs))
|
||||
test_result = 0;
|
||||
if (exp_frees >= 0
|
||||
&& !TEST_int_eq(cur_custom_counts.free - saved_custom_counts.free,
|
||||
exp_frees))
|
||||
test_result = 0;
|
||||
#endif
|
||||
|
||||
return test_result;
|
||||
}
|
||||
|
||||
static int check_exp(const char * const fn, const int ln, const size_t sz,
|
||||
const bool secure, const bool zero, char * const ret,
|
||||
const enum exp_ret exp, int exp_mallocs, int exp_reallocs)
|
||||
{
|
||||
int num_errs;
|
||||
unsigned long err_code = 0;
|
||||
const char *err_file = NULL;
|
||||
int err_line = 0;
|
||||
const char *err_func = NULL;
|
||||
const char *err_data = NULL;
|
||||
int err_flags = 0;
|
||||
int test_result = 1;
|
||||
unsigned long oom_err;
|
||||
|
||||
num_errs = ERR_count_to_mark();
|
||||
if (num_errs > 0) {
|
||||
err_code = ERR_peek_last_error_all(&err_file, &err_line, &err_func,
|
||||
&err_data, &err_flags);
|
||||
}
|
||||
|
||||
switch (exp) {
|
||||
case EXP_OOM:
|
||||
oom_err = secure ? CRYPTO_R_SECURE_MALLOC_FAILURE
|
||||
: ERR_R_MALLOC_FAILURE;
|
||||
if (!TEST_ptr_null(ret)
|
||||
|| !TEST_int_eq(num_errs, 1)
|
||||
|| !TEST_ulong_eq(err_code, ERR_PACK(ERR_LIB_CRYPTO, 0, oom_err))
|
||||
|| !TEST_str_eq(err_file, fn)
|
||||
|| !TEST_int_eq(err_line, ln)
|
||||
|| !TEST_str_eq(err_func, "")
|
||||
|| !TEST_str_eq(err_data, "")
|
||||
|| !TEST_int_eq(err_flags, 0))
|
||||
test_result = 0;
|
||||
|
||||
break;
|
||||
|
||||
case EXP_INVAL:
|
||||
if (!TEST_ptr_null(ret)
|
||||
|| !TEST_int_eq(num_errs, 1)
|
||||
|| !TEST_ulong_eq(err_code, ERR_PACK(ERR_LIB_CRYPTO, 0,
|
||||
ERR_R_PASSED_INVALID_ARGUMENT))
|
||||
|| !TEST_str_eq(err_file, fn)
|
||||
|| !TEST_int_eq(err_line, ln)
|
||||
|| !TEST_str_eq(err_func, "")
|
||||
|| !TEST_str_eq(err_data, "")
|
||||
|| !TEST_int_eq(err_flags, 0))
|
||||
test_result = 0;
|
||||
|
||||
break;
|
||||
|
||||
case EXP_INT_OF:
|
||||
if (!TEST_ptr_null(ret)
|
||||
|| !TEST_int_eq(num_errs, 1)
|
||||
|| !TEST_ulong_eq(err_code, ERR_PACK(ERR_LIB_CRYPTO, 0,
|
||||
CRYPTO_R_INTEGER_OVERFLOW))
|
||||
|| !TEST_str_eq(err_file, fn)
|
||||
|| !TEST_int_eq(err_line, ln)
|
||||
|| !TEST_str_eq(err_func, "")
|
||||
|| !TEST_str_eq(err_data, "")
|
||||
|| !TEST_int_eq(err_flags, 0))
|
||||
test_result = 0;
|
||||
|
||||
break;
|
||||
|
||||
case EXP_NONNULL:
|
||||
if (!TEST_ptr(ret)
|
||||
|| !TEST_int_eq(num_errs, 0)) {
|
||||
test_result = 0;
|
||||
} else if (zero) {
|
||||
if (!check_zero_mem(ret, sz))
|
||||
test_result = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case EXP_ZERO_SIZE:
|
||||
/*
|
||||
* Since the pointer ca either be NULL or non-NULL, depending
|
||||
* on implementation, we can only check for the absence of errors.
|
||||
*/
|
||||
if (!TEST_int_eq(num_errs, 0))
|
||||
test_result = 0;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
TEST_error("Unexpected expected result");
|
||||
test_result = 0;
|
||||
}
|
||||
|
||||
ERR_pop_to_mark();
|
||||
|
||||
/*
|
||||
* We don't check for frees here as there's a non-trivial amount
|
||||
* of free calls in the error handling routines.
|
||||
*/
|
||||
test_result &= check_counts(exp_mallocs, exp_reallocs, -1);
|
||||
|
||||
return test_result;
|
||||
}
|
||||
|
||||
static int test_xalloc(const bool secure, const bool array, const bool zero,
|
||||
const bool macro, const struct array_alloc_vector *td)
|
||||
{
|
||||
char *ret;
|
||||
int ln = test_line;
|
||||
size_t sz = td->nmemb * td->size;
|
||||
enum exp_ret exp = array ? td->exp_calloc : td->exp_malloc;
|
||||
bool really_secure = secure && secure_memory_is_secure;
|
||||
int exp_cnt = 0;
|
||||
int res;
|
||||
|
||||
check_exp_prep();
|
||||
|
||||
if (macro) {
|
||||
if (secure) {
|
||||
if (array) {
|
||||
if (zero)
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_secure_calloc(td->nmemb, td->size);
|
||||
else
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_secure_malloc_array(td->nmemb, td->size);
|
||||
} else {
|
||||
if (zero)
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_secure_zalloc(sz);
|
||||
else
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_secure_malloc(sz);
|
||||
}
|
||||
} else {
|
||||
if (array) {
|
||||
if (zero)
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_calloc(td->nmemb, td->size);
|
||||
else
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_malloc_array(td->nmemb, td->size);
|
||||
} else {
|
||||
if (zero)
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_zalloc(sz);
|
||||
else
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_malloc(sz);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (array) {
|
||||
ret = (secure ? (zero ? CRYPTO_secure_calloc
|
||||
: CRYPTO_secure_malloc_array)
|
||||
: (zero ? CRYPTO_calloc
|
||||
: CRYPTO_malloc_array))(td->nmemb, td->size,
|
||||
test_fn, test_line);
|
||||
} else {
|
||||
ret = (secure ? (zero ? CRYPTO_secure_zalloc
|
||||
: CRYPTO_secure_malloc)
|
||||
: (zero ? CRYPTO_zalloc
|
||||
: CRYPTO_malloc))(sz, test_fn, test_line);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* There is an OPENSSL_calloc in ERR_set_debug, triggered
|
||||
* from ossl_report_alloc_err_ex.
|
||||
*/
|
||||
exp_cnt += IS_FAIL(exp) && (!macro || (bool) OPENSSL_FILE[0]);
|
||||
/*
|
||||
* Secure allocations don't trigger alloc counting.
|
||||
* EXP_OOM is special as it comes on return from the (called and counted)
|
||||
* allocation function.
|
||||
*/
|
||||
if (!really_secure)
|
||||
exp_cnt += !!(exp == EXP_OOM || !IS_FAIL(exp));
|
||||
res = check_exp(macro ? OPENSSL_FILE : test_fn, ln, sz, really_secure, zero,
|
||||
ret, exp, exp_cnt, 0);
|
||||
|
||||
if (really_secure)
|
||||
OPENSSL_secure_free(ret);
|
||||
else
|
||||
OPENSSL_free(ret);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int test_xrealloc(const bool clear, const bool array, const bool macro,
|
||||
const struct array_realloc_vector *td)
|
||||
{
|
||||
char *ret = NULL;
|
||||
char *old_ret = NULL;
|
||||
int exp_malloc_cnt, exp_realloc_cnt;
|
||||
int res = 1;
|
||||
size_t i;
|
||||
|
||||
/*
|
||||
* Do two passes, first with NULL ptr, then with the result of the first
|
||||
* call.
|
||||
*/
|
||||
for (i = 0; i < 2; i++) {
|
||||
size_t nmemb = i ? td->new_nmemb : td->orig_nmemb;
|
||||
size_t old_nmemb = i ? td->orig_nmemb : 0;
|
||||
size_t sz = nmemb * td->size;
|
||||
size_t old_sz = old_nmemb * td->size;
|
||||
int ln = test_line;
|
||||
enum exp_ret exp = i ? (array ? td->exp_new_array : td->exp_new)
|
||||
: (array ? td->exp_orig_array : td->exp_orig);
|
||||
enum exp_ret exp2 = !i ? (array ? td->exp_new_array : td->exp_new)
|
||||
: (array ? td->exp_orig_array : td->exp_orig);
|
||||
|
||||
exp_malloc_cnt = exp_realloc_cnt = 0;
|
||||
|
||||
/* clear_realloc_array checks both new and old sizes */
|
||||
if (clear && array && i && exp2 == EXP_INT_OF)
|
||||
exp = EXP_INT_OF;
|
||||
|
||||
if (exp != EXP_INT_OF) {
|
||||
if (clear) {
|
||||
/*
|
||||
* clear_alloc just calls cleanse if contraction has been
|
||||
* requested.
|
||||
*/
|
||||
if (ret == NULL || sz > old_sz)
|
||||
exp_malloc_cnt++;
|
||||
} else {
|
||||
exp_realloc_cnt++;
|
||||
#if !USE_CUSTOM_ALLOC_FNS
|
||||
/* CRYPTO_malloc() is called explicitly when p is NULL. */
|
||||
if (ret == NULL)
|
||||
exp_malloc_cnt++;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
if (!macro || OPENSSL_FILE[0] != '\0')
|
||||
exp_malloc_cnt++;
|
||||
}
|
||||
|
||||
check_exp_prep();
|
||||
|
||||
if (macro) {
|
||||
if (array) {
|
||||
if (clear)
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_clear_realloc_array(ret, old_nmemb, nmemb, td->size);
|
||||
else
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_realloc_array(ret, nmemb, td->size);
|
||||
} else {
|
||||
if (clear)
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_clear_realloc(ret, old_sz, sz);
|
||||
else
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_realloc(ret, sz);
|
||||
}
|
||||
} else {
|
||||
if (array) {
|
||||
if (clear)
|
||||
ret = CRYPTO_clear_realloc_array(ret, old_nmemb, nmemb,
|
||||
td->size,
|
||||
test_fn, test_line);
|
||||
else
|
||||
ret = CRYPTO_realloc_array(ret, nmemb, td->size,
|
||||
test_fn, test_line);
|
||||
} else {
|
||||
if (clear)
|
||||
ret = CRYPTO_clear_realloc(ret, old_sz, sz,
|
||||
test_fn, test_line);
|
||||
else
|
||||
ret = CRYPTO_realloc(ret, sz, test_fn, test_line);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* There is an OPENSSL_calloc in ERR_set_debug, triggered
|
||||
* from ossl_report_alloc_err_ex.
|
||||
*/
|
||||
exp_malloc_cnt += !!(exp == EXP_OOM
|
||||
&& (!macro || (bool) OPENSSL_FILE[0]));
|
||||
|
||||
res = check_exp(macro ? OPENSSL_FILE : test_fn, ln, sz, false, false,
|
||||
ret, exp, exp_malloc_cnt, exp_realloc_cnt);
|
||||
if (res == 0)
|
||||
TEST_error("realloc return code check fail with i = %zu"
|
||||
", old_ret = %p, ret = %p, old_nmemb = %#zx"
|
||||
", nmemb = %#zx, size = %#zx",
|
||||
i, (void *) old_ret, (void *) ret, old_nmemb, nmemb,
|
||||
td->size);
|
||||
|
||||
/* Write data on the first pass and check it on the second */
|
||||
if (res != 0 && exp == EXP_NONNULL && exp2 == EXP_NONNULL) {
|
||||
size_t check_sz = MIN(td->orig_nmemb * td->size,
|
||||
td->new_nmemb * td->size);
|
||||
size_t j;
|
||||
size_t num_err = 0;
|
||||
|
||||
if (i != 0) {
|
||||
for (j = 0; j < check_sz; j++) {
|
||||
char exp_val = (uint8_t) ((uintptr_t) td * 253 + j * 17);
|
||||
|
||||
if (ret[j] != exp_val) {
|
||||
if (!num_err)
|
||||
TEST_error("Memory mismatch at byte %zu of %zu: "
|
||||
"%#04hhx != %#04hhx",
|
||||
j, check_sz, ret[j], exp_val);
|
||||
|
||||
res = 0;
|
||||
num_err++;
|
||||
}
|
||||
}
|
||||
|
||||
if (num_err != 0)
|
||||
TEST_error("Total errors: %zu", num_err);
|
||||
} else {
|
||||
for (j = 0; j < check_sz; j++)
|
||||
ret[j] = (uint8_t) ((uintptr_t) td * 253 + j * 17);
|
||||
}
|
||||
}
|
||||
|
||||
/* Freeing the old allocation if realloc has failed */
|
||||
if (old_ret != 0 && ret == 0 && exp != EXP_ZERO_SIZE)
|
||||
OPENSSL_free(old_ret);
|
||||
|
||||
old_ret = ret;
|
||||
}
|
||||
|
||||
OPENSSL_free(ret);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int test_xaligned_alloc(const bool array, const bool macro,
|
||||
const struct array_aligned_alloc_vector *td)
|
||||
{
|
||||
char *ret;
|
||||
int ln = test_line;
|
||||
size_t sz = td->nmemb * td->size;
|
||||
enum exp_ret exp = array ? td->exp_array : td->exp;
|
||||
int exp_cnt = 0;
|
||||
void *freeptr = &freeptr;
|
||||
int res = 1;
|
||||
|
||||
check_exp_prep();
|
||||
|
||||
if (macro) {
|
||||
if (array) {
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_aligned_alloc_array(td->nmemb, td->size, td->align, &freeptr);
|
||||
} else {
|
||||
ln = OPENSSL_LINE, ret = OPENSSL_aligned_alloc(sz, td->align, &freeptr);
|
||||
}
|
||||
} else {
|
||||
if (array)
|
||||
ret = CRYPTO_aligned_alloc_array(td->nmemb, td->size, td->align,
|
||||
&freeptr, test_fn, test_line);
|
||||
else
|
||||
ret = CRYPTO_aligned_alloc(sz, td->align, &freeptr,
|
||||
test_fn, test_line);
|
||||
}
|
||||
|
||||
#if !defined(OPENSSL_SMALL_FOOTPRINT)
|
||||
/*
|
||||
* aligned_alloc doesn't increment the call counts by itself, and
|
||||
* OPENSSL_malloc is only called when the open-coded implementation
|
||||
* is used.
|
||||
*/
|
||||
# if USE_CUSTOM_ALLOC_FNS \
|
||||
|| !(defined(_BSD_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L))
|
||||
exp_cnt += !!(exp != EXP_INT_OF && exp != EXP_INVAL);
|
||||
# endif
|
||||
#else /* OPENSSL_SMALL_FOOTPRINT */
|
||||
exp = exp == EXP_INT_OF ? EXP_INT_OF : EXP_ZERO_SIZE;
|
||||
#endif /* !OPENSSL_SMALL_FOOTPRINT */
|
||||
|
||||
/*
|
||||
* There is an OPENSSL_calloc in ERR_set_debug, triggered
|
||||
* from ossl_report_alloc_err_ex.
|
||||
*/
|
||||
exp_cnt += IS_FAIL(exp) && (!macro || (bool) OPENSSL_FILE[0]);
|
||||
res &= check_exp(macro ? OPENSSL_FILE : test_fn, ln, sz, false, false,
|
||||
ret, exp, exp_cnt, 0);
|
||||
|
||||
/* Check the pointer's alignment */
|
||||
if (exp == EXP_NONNULL) {
|
||||
if (!TEST_uint64_t_eq((uintptr_t) ret & (td->align - 1), 0))
|
||||
res = 0;
|
||||
}
|
||||
|
||||
#if !defined(OPENSSL_SMALL_FOOTPRINT)
|
||||
if (IS_FAIL(exp) && !TEST_ptr_null(freeptr))
|
||||
res = 0;
|
||||
if ((exp = EXP_NONNULL) && !TEST_ptr(freeptr))
|
||||
res = 0;
|
||||
#else /* OPENSSL_SMALL_FOOTPRINT */
|
||||
if (!TEST_ptr_null(ret) || !TEST_ptr_null(freeptr))
|
||||
res = 0;
|
||||
#endif /* !OPENSSL_SMALL_FOOTPRINT */
|
||||
|
||||
OPENSSL_free(freeptr);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int test_malloc(const int i)
|
||||
{
|
||||
return test_xalloc(false, false, false, false, array_alloc_vectors + i)
|
||||
&& test_xalloc(false, false, false, true, array_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_zalloc(const int i)
|
||||
{
|
||||
return test_xalloc(false, false, true, false, array_alloc_vectors + i)
|
||||
&& test_xalloc(false, false, true, true, array_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_malloc_array(const int i)
|
||||
{
|
||||
return test_xalloc(false, true, false, false, array_alloc_vectors + i)
|
||||
&& test_xalloc(false, true, false, true, array_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_calloc(const int i)
|
||||
{
|
||||
return test_xalloc(false, true, true, false, array_alloc_vectors + i)
|
||||
&& test_xalloc(false, true, true, true, array_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_secure_malloc(const int i)
|
||||
{
|
||||
return test_xalloc(true, false, false, false, array_alloc_vectors + i)
|
||||
&& test_xalloc(true, false, false, true, array_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_secure_zalloc(const int i)
|
||||
{
|
||||
return test_xalloc(true, false, true, false, array_alloc_vectors + i)
|
||||
&& test_xalloc(true, false, true, true, array_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_secure_malloc_array(const int i)
|
||||
{
|
||||
return test_xalloc(true, true, false, false, array_alloc_vectors + i)
|
||||
&& test_xalloc(true, true, false, true, array_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_secure_calloc(const int i)
|
||||
{
|
||||
return test_xalloc(true, true, true, false, array_alloc_vectors + i)
|
||||
&& test_xalloc(true, true, true, true, array_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_realloc(const int i)
|
||||
{
|
||||
return test_xrealloc(false, false, false, array_realloc_vectors + i)
|
||||
&& test_xrealloc(false, false, true, array_realloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_clear_realloc(const int i)
|
||||
{
|
||||
return test_xrealloc(true, false, false, array_realloc_vectors + i)
|
||||
&& test_xrealloc(true, false, true, array_realloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_realloc_array(const int i)
|
||||
{
|
||||
return test_xrealloc(false, true, false, array_realloc_vectors + i)
|
||||
&& test_xrealloc(false, true, true, array_realloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_clear_realloc_array(const int i)
|
||||
{
|
||||
return test_xrealloc(true, true, false, array_realloc_vectors + i)
|
||||
&& test_xrealloc(true, true, true, array_realloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_aligned_alloc(const int i)
|
||||
{
|
||||
return test_xaligned_alloc(false, false, array_aligned_alloc_vectors + i)
|
||||
&& test_xaligned_alloc(false, true, array_aligned_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_aligned_alloc_array(const int i)
|
||||
{
|
||||
return test_xaligned_alloc(true, false, array_aligned_alloc_vectors + i)
|
||||
&& test_xaligned_alloc(true, true, array_aligned_alloc_vectors + i);
|
||||
}
|
||||
|
||||
static int test_free(void)
|
||||
{
|
||||
int test_result = 1;
|
||||
void *p;
|
||||
|
||||
save_counts();
|
||||
OPENSSL_free(NULL);
|
||||
if (!TEST_int_eq(check_counts(0, 0, 1), 1))
|
||||
test_result = 0;
|
||||
|
||||
save_counts();
|
||||
CRYPTO_free(NULL, test_fn, test_line);
|
||||
if (!TEST_int_eq(check_counts(0, 0, 1), 1))
|
||||
test_result = 0;
|
||||
|
||||
save_counts();
|
||||
p = OPENSSL_malloc(42);
|
||||
OPENSSL_free(p);
|
||||
if (!TEST_int_eq(check_counts(1, 0, 1), 1))
|
||||
test_result = 0;
|
||||
|
||||
save_counts();
|
||||
p = CRYPTO_calloc(23, 69, test_fn, test_line);
|
||||
CRYPTO_free(p, test_fn, test_line);
|
||||
if (!TEST_int_eq(check_counts(1, 0, 1), 1))
|
||||
test_result = 0;
|
||||
|
||||
return test_result;
|
||||
}
|
||||
|
||||
int setup_tests(void)
|
||||
{
|
||||
secure_memory_is_secure = CRYPTO_secure_malloc_init(65536, 4);
|
||||
TEST_info("secure memory init: %d", secure_memory_is_secure);
|
||||
|
||||
ADD_ALL_TESTS(test_malloc, OSSL_NELEM(array_alloc_vectors));
|
||||
ADD_ALL_TESTS(test_zalloc, OSSL_NELEM(array_alloc_vectors));
|
||||
ADD_ALL_TESTS(test_malloc_array, OSSL_NELEM(array_alloc_vectors));
|
||||
ADD_ALL_TESTS(test_calloc, OSSL_NELEM(array_alloc_vectors));
|
||||
|
||||
ADD_ALL_TESTS(test_secure_malloc, OSSL_NELEM(array_alloc_vectors));
|
||||
ADD_ALL_TESTS(test_secure_zalloc, OSSL_NELEM(array_alloc_vectors));
|
||||
ADD_ALL_TESTS(test_secure_malloc_array, OSSL_NELEM(array_alloc_vectors));
|
||||
ADD_ALL_TESTS(test_secure_calloc, OSSL_NELEM(array_alloc_vectors));
|
||||
|
||||
ADD_ALL_TESTS(test_realloc, OSSL_NELEM(array_realloc_vectors));
|
||||
ADD_ALL_TESTS(test_clear_realloc, OSSL_NELEM(array_realloc_vectors));
|
||||
ADD_ALL_TESTS(test_realloc_array, OSSL_NELEM(array_realloc_vectors));
|
||||
ADD_ALL_TESTS(test_clear_realloc_array, OSSL_NELEM(array_realloc_vectors));
|
||||
|
||||
ADD_ALL_TESTS(test_aligned_alloc, OSSL_NELEM(array_aligned_alloc_vectors));
|
||||
ADD_ALL_TESTS(test_aligned_alloc_array,
|
||||
OSSL_NELEM(array_aligned_alloc_vectors));
|
||||
|
||||
ADD_TEST(test_free);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if USE_CUSTOM_ALLOC_FNS
|
||||
int global_init(void)
|
||||
{
|
||||
if (!CRYPTO_set_mem_functions(my_malloc, my_realloc, my_free)) {
|
||||
fprintf(stderr, "Failed to override allocator functions");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
16
test/recipes/02-test_mem_alloc.t
Normal file
16
test/recipes/02-test_mem_alloc.t
Normal file
@@ -0,0 +1,16 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
use OpenSSL::Test::Simple;
|
||||
|
||||
{
|
||||
local $ENV{"ASAN_OPTIONS"} = "allocator_may_return_null=true";
|
||||
local $ENV{"MSAN_OPTIONS"} = "allocator_may_return_null=true";
|
||||
|
||||
simple_test("test_mem_alloc", "mem_alloc_test");
|
||||
}
|
||||
16
test/recipes/02-test_mem_alloc_custom_fns.t
Normal file
16
test/recipes/02-test_mem_alloc_custom_fns.t
Normal file
@@ -0,0 +1,16 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
use OpenSSL::Test::Simple;
|
||||
|
||||
{
|
||||
local $ENV{"ASAN_OPTIONS"} = "allocator_may_return_null=true";
|
||||
local $ENV{"MSAN_OPTIONS"} = "allocator_may_return_null=true";
|
||||
|
||||
simple_test("test_mem_alloc_custom_fns", "mem_alloc_custom_fns_test");
|
||||
}
|
||||
Reference in New Issue
Block a user