How to reproduce this bug:

./clone07 -i 19



Index: clone07.c
===================================================================
--- clone07.c   (revision 301)
+++ clone07.c   (working copy)
@@ -114,17 +114,17 @@
         /* perform global setup for test */
         setup();

-       /* Allocate stack for child */
-       if((child_stack = (void *) malloc(CHILD_STACK_SIZE)) == NULL) {
-               tst_brkm(TBROK, cleanup, "Cannot allocate stack for  
child");
-       }
-
         /* check looping state if -i option given */
         for (lc=0; TEST_LOOPING(lc); lc++) {

                 /* reset Tst_count in case we are looping. */
                 Tst_count=0;

+               /* Allocate stack for child */
+               if((child_stack = (void *) malloc(CHILD_STACK_SIZE)) ==  
NULL) {
+                       tst_brkm(TBROK, cleanup, "Cannot allocate stack  
for child");
+               }
+
                 /*
                  * Call clone(2)
                  */


-- 
Guo Hongruan, Embedded Linux Consultant
Mobile: +86-0-13484056007
Skype: camelguo
http://www.gulessoft.com

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to