From 253fb83d191ff1e799a5919739c5e79b20321ca3 Mon Sep 17 00:00:00 2001 From: yuanhecai Date: Tue, 27 Oct 2026 14:00:22 +0800 Subject: [PATCH] benchmark: initialize maxerr in cholesky.c maxerr is read before it is written in the verification loop (if (maxerr < err) maxerr = err), which is undefined behavior. Depending on the stale stack value this can trigger a spurious "Hmm, probably it has bug." abort - e.g. on LoongArch with gcc 14.2 it did so at M=1 even though the result was correct. Fix it the same way benchmark/linpack.c already does ("maxerr = 0.;" before its check loop). --- benchmark/cholesky.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/cholesky.c b/benchmark/cholesky.c index 65b20d039f..5bbb3e5a5e 100644 --- a/benchmark/cholesky.c +++ b/benchmark/cholesky.c @@ -103,7 +103,7 @@ int main(int argc, char *argv[]){ int to = 200; int step = 1; - FLOAT maxerr; + FLOAT maxerr = 0.0; double time1;