]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add a daily memory allocation failure test
authorNeil Horman <nhorman@openssl.org>
Wed, 23 Jul 2025 14:56:38 +0000 (10:56 -0400)
committerNeil Horman <nhorman@openssl.org>
Wed, 6 Aug 2025 13:07:40 +0000 (09:07 -0400)
nightly, run the memory allocation failure test.

We build with asan enabled to log memory leaks and other issues

Note the test is designed to pass even if the test fails, as currently
(perhaps not suprisingly), several error paths result in asan errors.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28078)

.github/workflows/run-checker-daily.yml

index 239c2c0ab61c595f4ac135886ef063d31a4aeb04..bef1e8aacfe27658837e69aad32c63f9a2c2d53a 100644 (file)
@@ -258,6 +258,28 @@ jobs:
     - name: make test
       run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
 
+  malloc_failure_testing:
+    runs-on: ubuntu-latest
+    steps:
+    - name: checkout openssl
+      uses: actions/checkout@v4
+    - name: Adjust ASLR for sanitizer
+      run: |
+        sudo cat /proc/sys/vm/mmap_rnd_bits
+        sudo sysctl -w vm.mmap_rnd_bits=28
+    - name: config
+      run: ./config --strict-warnings --banner=Configured --debug enable-asan enable-crypto-mdebug enable-allocfail-tests && perl configdata.pm --dump
+    - name: make
+      run: make -s -j4
+    - name: get cpu info
+      run: |
+        cat /proc/cpuinfo
+        ./util/opensslwrap.sh version -c
+    - name: make test
+      continue-on-error: true
+      run: |
+        make TESTS=test_handshake-memfail test
+
   enable_brotli_and_asan_ubsan:
     runs-on: ubuntu-latest
     steps: