From fa546d68addf32f346c9d2515689dea98f12c4ef Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Sun, 11 Oct 2026 22:34:29 +0100 Subject: [PATCH] StackOverflow test: a frame big enough to fault in its prologue With a 512-byte frame, where the stack started (the env's size) put the guard page under the body's pushes in ~3% of runs, so CI saw 7:5 for 4:1. Its own reading (a signal is told where it stopped) was right; the test wasn't. A 512 KB frame: 0 of 526 env sizes misplace it. Co-Authored-By: Claude Opus 5.5 (1M context) --- diff --git a/test/run/StackOverflow.raz b/test/run/StackOverflow.raz index 6eb5c15..0677b85 100644 --- a/test/run/StackOverflow.raz +++ b/test/run/StackOverflow.raz @@ -1,10 +1,13 @@ module StackOverflow; -(* A recursion with no end runs out of stack: SIGSEGV, said as such *) +(* A recursion with no end runs out of stack: SIGSEGV, said as such. + The frame is big so that the fault lands in the prologue, which + zeroes it from the bottom: with a small one, where the stack starts + could put the guard page under the body's pushes instead. *) proc down(n: I64): I64; -var pad: [64]I64; +var pad: [65536]I64; begin - pad[n mod 64] := n; + pad[n mod 65536] := n; return down(n + 1) + pad[0]; end; diff --git a/test/run/StackOverflow.stderr b/test/run/StackOverflow.stderr index 49ebfa2..070b0b7 100644 --- a/test/run/StackOverflow.stderr +++ b/test/run/StackOverflow.stderr @@ -1 +1 @@ -test/run/StackOverflow.raz:4:1: stopped by a stack overflow +test/run/StackOverflow.raz:7:1: stopped by a stack overflow