From 111ad617c889c0252a6ffb5bfe343aa6c0f1f83c Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Wed, 8 Jan 2025 12:09:12 +0000 Subject: [PATCH] Bound stack size in expect tests --- flambda-backend/testsuite/tools/expect.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flambda-backend/testsuite/tools/expect.ml b/flambda-backend/testsuite/tools/expect.ml index f0772c1866c..694a3cb0920 100644 --- a/flambda-backend/testsuite/tools/expect.ml +++ b/flambda-backend/testsuite/tools/expect.ml @@ -385,6 +385,9 @@ let usage = "Usage: expect_test [script-file [arguments]]\n\ options are:" let () = + (* Some tricky typing tests cause stack overflows in the compiler. + Bounding the compiler's stack size makes that happen faster. *) + Gc.set {(Gc.get ()) with stack_limit = 1_000_000}; (* Early disabling of colors in any output *) let () = Clflags.color := Some Misc.Color.Never;