[PATCH 1/2] mmap: decode MAP_UNINITIALIZE

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Jan 22 17:09:50 UTC 2013


On 22 January 2013 10:35, Dmitry V. Levin <ldv at altlinux.org> wrote:
> On Tue, Jan 22, 2013 at 10:16:42AM +0100, Bernhard Reutner-Fischer wrote:
>> On 21 January 2013 15:23, Dmitry V. Levin <ldv at altlinux.org> wrote:
>> > On Mon, Jan 21, 2013 at 02:36:55PM +0100, Bernhard Reutner-Fischer wrote:
>> >> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
>> >> ---
>> >>  mem.c |    3 +++
>> >>  1 file changed, 3 insertions(+)
>> >>
>> >> diff --git a/mem.c b/mem.c
>> >> index 0279030..53fcf85 100644
>> >> --- a/mem.c
>> >> +++ b/mem.c
>> >> @@ -159,6 +159,9 @@ static const struct xlat mmap_flags[] = {
>> >>  #ifdef MAP_STACK
>> >>       { MAP_STACK,    "MAP_STACK"     },
>> >>  #endif
>> >> +#ifdef MAP_UNINITIALIZE
>> >> +     { MAP_UNINITIALIZE,"MAP_UNINITIALIZE"},
>> >> +#endif
>> >>  #ifdef MAP_NOSYNC
>> >>       { MAP_NOSYNC,   "MAP_NOSYNC"    },
>> >>  #endif
>> >
>> > You mean MAP_UNINITIALIZED?
>>
>> ugh, it seems that the name changed mid-flight :(
>> So yes, i mean MAP_UNINITIALIZED, i will change uClibc to add the 'D'.
>
> OK, is there a chance to get MAP_UNINITIALIZED defined to 0?

AFAICS no.

> If yes, then there needs to be a check for that case, e.g.
> #if MAP_UNINITIALIZED > 0

#if defined MAP_UNINITIALIZED && MAP_UNINITIALIZED + 0 > 0
for a redundant, exhaustive check but no, it is always 0x4000000




More information about the Strace-devel mailing list