From 870cae2736f25f8ad8d5b44e5266a67869cdd38e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Sep 2006 03:23:52 +0000 Subject: r18497: fixed crash bug in irpc test - the torture_tcase_add_test() call is passed a stack pointer from values[], which is not valid when the torture suite is run. Jelmer, need to be careful when converting test code not to use stack values from the torture_XXX() call in the test suite (This used to be commit 2744a0b385f58aaf0b45f33bec0d0a16c09709d7) --- source4/torture/local/irpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/torture/local/irpc.c b/source4/torture/local/irpc.c index 219cf0bcdb..2ce9eb675d 100644 --- a/source4/torture/local/irpc.c +++ b/source4/torture/local/irpc.c @@ -242,8 +242,8 @@ struct torture_suite *torture_local_irpc(TALLOC_CTX *mem_ctx) struct torture_suite *suite = torture_suite_create(mem_ctx, "LOCAL-IRPC"); struct torture_tcase *tcase = torture_suite_add_tcase(suite, "irpc"); int i; - uint32_t values[] = {0, 0x7FFFFFFE, 0xFFFFFFFE, 0xFFFFFFFF, - random() & 0xFFFFFFFF}; + static uint32_t values[] = {0, 0x7FFFFFFE, 0xFFFFFFFE, 0xFFFFFFFF, + random() & 0xFFFFFFFF}; tcase->setup = irpc_setup; -- cgit