Bug 571432 - strace incorrectly shows the arguments of fadvise() in 32 bit compat programs
Summary: strace incorrectly shows the arguments of fadvise() in 32 bit compat programs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-08 14:33 UTC by john.haxby@oracle.com
Modified: 2010-05-27 18:31 UTC (History)
3 users (show)

Fixed In Version: strace-4.5.20-1.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-27 18:31:37 UTC


Attachments (Terms of Use)
Proposed patch (9.20 KB, patch)
2010-03-08 14:33 UTC, john.haxby@oracle.com
no flags Details | Diff

Description john.haxby@oracle.com 2010-03-08 14:33:31 UTC
Created attachment 398534 [details]
Proposed patch

Description of problem:
  strace incorrectly shows the arguments of fadvise() in
  32 bit compat programs

Version-Release number of selected component (if applicable):
  strace-4.5.19-1.fc12.x86_64

How reproducible: Always


Steps to Reproduce:
1. Find a program that calls posix_fadvise(2).  My sample program calls
   posix_fadvise(2) like this:

        posix_fadvise(fd, 0, 0, POSIX_FADV_RANDOM);
        posix_fadvise(fd, 5, 7, POSIX_FADV_SEQUENTIAL);
        posix_fadvise64(fd, 0, 0, POSIX_FADV_RANDOM);
        posix_fadvise64(fd, 5, 7, POSIX_FADV_SEQUENTIAL);

   (The second and third arguments are only to illustrate the problem, they
    don't actually have any useful meaning.)

2. Compile it as a 32 bit application
3. Run under strace.
  
Actual results:
  fadvise64(3, 0, 0, POSIX_FADV_NORMAL)   = 0
  fadvise64(3, 5, 0, 0x7 /* POSIX_FADV_??? */) = 0
  fadvise64_64(3, 0, 0, POSIX_FADV_NORMAL) = 0
  fadvise64_64(3, 5, 0, 0x7 /* POSIX_FADV_??? */) = 0

Expected results:
  fadvise64(3, 0, 0, POSIX_FADV_RANDOM)   = 0
  fadvise64(3, 5, 7, POSIX_FADV_SEQUENTIAL) = 0
  fadvise64_64(3, 0, 0, POSIX_FADV_RANDOM) = 0
  fadvise64_64(3, 5, 7, POSIX_FADV_SEQUENTIAL) = 0


Additional info:
  The attached patch fixes this problem, it is based on:

    commit b5600fc3df0453ba11f254a9b49add3ffbec9733
    Author: Andreas Schwab <schwab@redhat.com>
    Date:   Wed Nov 4 17:08:34 2009 +0100

  (The changes are merely needed to make it apply cleanly.)

Comment 1 john.haxby@oracle.com 2010-03-08 14:44:15 UTC
See also bug 571437 (RHEL5)

Comment 2 Fedora Update System 2010-05-10 16:14:37 UTC
strace-4.5.20-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/strace-4.5.20-1.fc12

Comment 3 john.haxby@oracle.com 2010-05-10 16:35:25 UTC
That version works for me.

Comment 4 Fedora Update System 2010-05-11 19:36:45 UTC
strace-4.5.20-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update strace'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/strace-4.5.20-1.fc12

Comment 5 Fedora Update System 2010-05-27 18:31:32 UTC
strace-4.5.20-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.