Bug 418551 - Incorrect get_mempolicy prototype
Summary: Incorrect get_mempolicy prototype
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: numactl
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Neil Horman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 426369
TreeView+ depends on / blocked
 
Reported: 2007-12-10 18:05 UTC by Ulrich Drepper
Modified: 2008-06-27 04:32 UTC (History)
0 users

Fixed In Version: 1.0.2-4.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-27 04:32:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ulrich Drepper 2007-12-10 18:05:03 UTC
Description of problem:
The <numaif.h> header contains:

extern long get_mempolicy(int *policy, 
                          const unsigned long *nmask, unsigned long maxnode,
                          void *addr, int flags);

But the nmask pointer points to writable memory.  This problem is not noticed by
the compiler when compiling the package since this is a system call.  But it
might lead to bad problems when using the interface since the compiler can
assume the memory is not changed.



Version-Release number of selected component (if applicable):
0.9.8-4

How reproducible:
always

Steps to Reproduce:
1.look at /usr/include/numaif.h
2.
3.
  
Actual results:
above prototype

Expected results:
const removed:
extern long get_mempolicy(int *policy, 
                          unsigned long *nmask, unsigned long maxnode,
                          void *addr, int flags);

Additional info:
This must also be fixed in RHEL versions.  Without this change incorrect code
might silently be generated.

Comment 1 Neil Horman 2007-12-20 15:27:35 UTC
Fixeed in devel, bug cloned for RHEL.  Thanks Uli

Comment 2 Bug Zapper 2008-05-14 04:09:40 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Ulrich Drepper 2008-06-27 04:32:18 UTC
Has been fixed in F9.


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