From 68e0b1320985202f343e8a83c33516a01c5ea537 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 16 May 2026 18:58:47 +0200 Subject: [PATCH] runner.pm: apply minor correctness fix "Lines 244-245 overwrite global variables `$runnerr` and `$runnerw` that were already assigned in the child process (lines 205-206). In the parent process context, these assignments appear incorrect and could cause issues if `runner_init` is called multiple times. The parent should only store references in the controller hashes." It could never cause an actual issue, but clarifies the intent of the code. Spotted and fixed by GitHub Code Quality Cherry-picked from #21646 Closes #21672 --- tests/runner.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/runner.pm b/tests/runner.pm index 4b6b12b0b8..a398800946 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -241,8 +241,10 @@ sub runner_init { } $controllerw{$thisrunnerid} = $thiscontrollerw; - $runnerr = $thisrunnerr; - $runnerw = $thisrunnerw; + if(!$multiprocess) { + $runnerr = $thisrunnerr; + $runnerw = $thisrunnerw; + } $controllerr{$thisrunnerid} = $thiscontrollerr; return $thisrunnerid;