Author: tridge
Date: 2006-09-14 03:23:52 +0000 (Thu, 14 Sep 2006)
New Revision: 18497

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18497

Log:

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

Modified:
   branches/SAMBA_4_0/source/torture/local/irpc.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/local/irpc.c
===================================================================
--- branches/SAMBA_4_0/source/torture/local/irpc.c      2006-09-14 03:17:11 UTC 
(rev 18496)
+++ branches/SAMBA_4_0/source/torture/local/irpc.c      2006-09-14 03:23:52 UTC 
(rev 18497)
@@ -242,8 +242,8 @@
        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;
 

Reply via email to