Hi,

--- Elder Costa <[EMAIL PROTECTED]> wrote:

> CAI Qian wrote:
> > Hi,
> > 
> > --- Elder Costa <[EMAIL PROTECTED]> wrote:
> > 
> >> I have run the latest CVS version and noticed ptrace06 is not being 
> >> compiled. Previous versions did compile but did not include it in the 
> >> default test lists so it was not running.
> >>
> >> Anyway I am getting an error when I run it in two different systems with 
> >> Ubuntu Feisty:
> >>
> >> ptrace06   16  FAIL  :  ptrace(PEEKUSER, ..., 0xc0, (nil)) returned 0 
> >> instead of -1
> >> ptrace06   17  PASS  :  ptrace(PEEKUSER, ..., 0xc1, (nil)) failed as 
> >> expected
> >> ptrace06   18  PASS  :  ptrace(PEEKUSER, ..., 0xc2, (nil)) failed as 
> >> expected
> >> ptrace06   19  PASS  :  ptrace(PEEKUSER, ..., 0xc3, (nil)) failed as 
> >> expected
> >> p
> >>
> >>
> >> I understand the test fails because ptrace was supposed to return -1 
> >> because the address supplied by the third argument is beyond pt_regs 
> >> struct boundaries. I did a quick test with Fedora as well and it fails 
> >> in the very same place. Is this the reason why this test has been 
> >> suppressed?
> >>
> > 
> > Please see my previous two emails regards this test,
> > 
> >
>
http://sourceforge.net/mailarchive/message.php?msg_name=333986.97998.qm%40web1108.biz.mail.sk1.yahoo.com
> > 
> > and
> > 
> >
>
http://sourceforge.net/mailarchive/message.php?msg_name=494544.45920.qm%40web1104.biz.mail.sk1.yahoo.com
> > 
> > Cai Qian
> >  
> 
> Cai. The testcase was compiling fine in my system. Just that particular 
> combination of parameters fails (with Ubuntu). It looks like a bug to me 
> either in libc or in the kernel (no bounds check) but I cannot say for 
> sure and I lack the time to digg deeper (though I am very curious).
> 

It looks like a test code issue. From ptrace(2) manpage,

"PTRACE_PEEKUSER
Reads  a  word at offset addr in the child’s USER area, which holds the 
registers and other
information about the process (see <linux/user.h> and <sys/user.h>).  The word 
is returned as the
result of the  ptrace()  call.  Typically the offset must be word-aligned, 
though this might vary
by architecture.  See NOTES.  (data is ignored.)".

>From the output of your failed test case above,

"ptrace06   16  FAIL  :  ptrace(PEEKUSER, ..., 0xc0, (nil)) returned 0  instead 
of -1".

0xc0 is word-aligned, so it could succeed.

Cai Qian

> Regards.
> 
> Elder.
> 
> 



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to