From 06ea755daf1ae5aa25f8fe95b61cff87d9331f32 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Mon, 14 Apr 2014 18:37:31 +0100 Subject: [PATCH] Move the marker down the stack so that gcc's aggressive inline won't scupper it. Copied from Perforce Change: 185524 ServerID: perforce.ravenbrook.com --- mps/code/airtest.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mps/code/airtest.c b/mps/code/airtest.c index 946e585bc2f..56e1bd8c129 100644 --- a/mps/code/airtest.c +++ b/mps/code/airtest.c @@ -90,14 +90,13 @@ static mps_gen_param_s obj_gen_params[] = { { 170, 0.45 } }; -static void test_main(int interior, int stack) +static void test_main(void *marker, int interior, int stack) { mps_res_t res; mps_chain_t obj_chain; mps_fmt_t obj_fmt; mps_thr_t thread; mps_root_t reg_root = NULL; - void *marker = ▮ res = mps_arena_create_k(&scheme_arena, mps_arena_class_vm(), mps_args_none); if (res != MPS_RES_OK) error("Couldn't create arena"); @@ -145,12 +144,14 @@ static void test_main(int interior, int stack) int main(int argc, char *argv[]) { + void *marker = ▮ + testlib_init(argc, argv); - test_main(TRUE, TRUE); - test_main(TRUE, FALSE); - /* not test_main(FALSE, TRUE) -- see .fail.lii6ll. */ - test_main(FALSE, FALSE); + test_main(marker, TRUE, TRUE); + test_main(marker, TRUE, FALSE); + /* not test_main(marker, FALSE, TRUE) -- see .fail.lii6ll. */ + test_main(marker, FALSE, FALSE); printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); return 0;