Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 146093 (IT_55591) - incorrect mmap flags with 32-bit binary on x86_64
Summary: incorrect mmap flags with 32-bit binary on x86_64
Alias: IT_55591
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: strace
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
Depends On:
Blocks: 132991 146413 154655
TreeView+ depends on / blocked
Reported: 2005-01-25 11:20 UTC by Bastien Nocera
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2005-130
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-05-19 21:10:05 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:130 normal SHIPPED_LIVE strace bug fix update 2005-06-09 04:00:00 UTC
Red Hat Product Errata RHBA-2005:131 normal SHIPPED_LIVE strace bug fix update 2005-05-19 04:00:00 UTC

Description Bastien Nocera 2005-01-25 11:20:44 UTC
#include <stdio.h>
int main(void)
        FILE *f;
        char a[100];
        char *b;

On x86_64, with a 64-bit testcase (last mmap call):
0) = 0x2a9566e000

On x86_64, with a 32-bit testcase (last mmap call):
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, 0x3 /* MAP_??? */, 34,
0xffffffff) = 0x40017000

0x3 would mean that the flags are MAP_SHARED|MAP_PRIVATE, and the file
descriptor is obviously wrong.

Comment 2 Roland McGrath 2005-02-02 03:19:05 UTC
I have fixed this upstream.  In fact, the bug was giving bad values
for the third and later arguments to all 32-bit syscalls on x86_64.
That bug was in the original x86_64 support for strace contributed
upstream by others.

Comment 9 Tim Powers 2005-05-19 21:10:05 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

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