FAQ: [#6251] pread/pwrite arent decoded correctly by strace(2010)

Document created by Aaronwu Employee on Sep 11, 2013
Version 1Show Document
  • View in full screen mode

[#6251] pread/pwrite arent decoded correctly by strace

Submitted By: Mike Frysinger

Open Date

2010-09-10 20:52:27     Close Date

2010-09-12 03:40:36

Priority:

Medium     Assignee:

Mike Frysinger

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2009R1.1-RC4     Release:

Category:

N/A     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

trunk

App binary format:

N/A     

Summary: pread/pwrite arent decoded correctly by strace

Details:

 

probably been like this forever, and pread()/pwrite() appear to work correctly, but they're just getting decoded incorrectly by strace ...

 

$ cat test.c

main(){pwrite(1, "foo", 3, 3);}

 

on the board:

$ strace /a.out

pwrite(1, "foo", 3, 12884901888)        = -1 ESPIPE (Illegal seek)

 

the return value is fine, but that last argument appears to be decoded incorrectly (maybe a 64bit vs 32bit issue).

 

Follow-ups

 

--- Mike Frysinger                                           2010-09-12 03:40:36

cross-compiling logic for endian handling of long long values is screwed up.  it

is forced to "no" which breaks probably all little endian systems.

 

once that is fixed, pread/pwrite decode correctly.  this probably affects all

system calls which take 64bit arguments.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes