Commit ab9decd55b for openssl.org

commit ab9decd55becb870eb4bf99171dad6e8b706ac24
Author: Mounir IDRASSI <mounir.idrassi@idrix.fr>
Date:   Fri Oct 2 20:12:44 2026 +0900

    test/run_tests.pl: avoid quadratic time on long test output

    With failure buffering enabled, the ALL callback appends nonempty output
    lines that it does not recognize as plans or test results to
    $output_buffer. Without an explicit return, that branch returns the
    accumulated buffer. TAP::Base::_make_callback() invokes callbacks in list
    context, even when TAP::Parser calls it in void context, so the buffer is
    copied. Each append then costs time proportional to the output accumulated
    so far, making processing quadratic for a growing sequence of such lines.

    run_tests.pl merges recipe stderr into the stream it reads. While the
    harness copies, a command writing enough stderr can fill that pipe and
    block. On Linux, with command stderr restored to this stream and the radix
    recipe from before #32395, test_quic_radix took 9.9 seconds without the fix
    and 2.3 seconds with it. Setting glibc's mmap threshold to a fixed 128 KiB
    increased the former to 85 seconds, while the fixed run took 2.3 seconds.
    The command blocked writing stderr while the harness kept a CPU busy,
    reproducing the signature reported in #32128. These measurements do not
    establish the cause of the historical OpenBSD and macOS stalls.

    Return no values from the callback; the parser does not use its result.
    V=1 disables failure buffering and avoids this accumulation path.

    Assisted-by: Claude Code:claude-opus-5-5
    Assisted-by: Codex:gpt-6-astra
    Reviewed-by: Jakub Zelenka <jakub.zelenka@openssl.foundation>
    Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
    Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
    Merge-date: Tue Oct  6 16:04:01 2026
    Merged-from: https://github.com/openssl/openssl/pull/33078

diff --git a/test/run_tests.pl b/test/run_tests.pl
index 4ba3553c82..be2c2a5d65 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -293,6 +293,11 @@ $eres = eval {
                         $output_buffer .= "\n".$self->as_string;
                     }
                 }
+
+                # TAP::Base calls callbacks in list context, so without this
+                # return, every line appended above would also return a copy
+                # of all of $output_buffer, which takes quadratic time.
+                return;
             }
         }