From: Ritesh H. <rit...@gm...> - 2012-09-04 03:50:39
|
Hi sarath, Following are the lines of code where the test case is exiting, for kernel 3.0.15 (ICS). 128 pm2=pm1; 129 free(pm1); 130 131 if((pm1=(char *)calloc(memsize,1)) == NULL) { 132 tst_resm(TFAIL, "calloc did not alloc memory "); 133 tst_exit(); 134 } 135 136 if(pm1 != pm2) { 137 tst_resm(TINFO, "pm1=%p pm2=%p ", pm1,pm2); 138 tst_resm(TFAIL, "free did not dealloc memory "); 139 tst_exit(); // *Here code is exited in kernel 3.0.15 while it is passing in case of kernel 3.4 (ICS)*. 140 } *LTP version = "LTP-20100630"* at line 136 my test is failing. Now isnt this condition of the dangling pointer. At line 129 we are freeing pm1 this means that pm2 becomes a dangling pointer. And how come after doing pm1=(char *)calloc(memsize,1) pm1 is equal to pm2 for kernel 3.4 (ICS) (Since this test case is passing for that)?? According to me, it should not be equal. Ritesh On Mon, Sep 3, 2012 at 6:55 PM, tadimarri sarath <sar...@gm...>wrote: > Hi Ritesh, > > May I know which version of the LTP you have used and the filesystem > environment used ? > The source can be found here > It is a testcase which does series of checks that memory can be allocated > and freed with various calloc, malloc, free, realloc, valloc functions. > please refer to the source here : > testcases/kernel/mem/mem/mem02.c > > Regards, > Sarath. > > On Mon, Sep 3, 2012 at 10:37 AM, Ritesh Harjani <rit...@gm...>wrote: > >> Has anyone tried running LTP tests on kernel 3.0.15 (Android ICS) and >> kernel 3.4 (Android ICS) >> >> Actually there is mem02 test which is failing in kernel 3.0.15 which is >> not the case with kernel 3.4. >> So, if anyone can point out why the difference and also if someone can >> direct me onto what exactly this test does and >> some source of information from where i can have a deeper understanding >> on this. >> >> Thank you >> Ritesh >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Ltp-list mailing list >> Ltp...@li... >> https://lists.sourceforge.net/lists/listinfo/ltp-list >> >> > |