Bug 31430 - glibc doesn't define MAP_UNINITIALIZED
Summary: glibc doesn't define MAP_UNINITIALIZED
Status: RESOLVED NOTABUG
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.39
: P2 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-28 17:59 UTC by steph123
Modified: 2024-03-01 20:42 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description steph123 2024-02-28 17:59:11 UTC
When you look into Linux 'man mmap' you'll find MAP_UNINITIALIZED which exists for roughly 14 years (in the Linux kernel).

However when I include sys/mman.h it says MAP_UNINITIALIZED is undeclared.

I am not 100% sure if this is a bug in glibc or intention.

I searched the web, mailing lists, stackoverflow and the glibc source code and found nothing about why this macro is undefined in glibc.

The only comment about this flag is in tst-mman-consts.py. It says MAP_UNINITIALIZED is kernel only. Does that mean glibc doesn't support Linux only features? I am not sure.
Comment 1 steph123 2024-02-28 18:09:01 UTC
In the glibc documentation MAP_UNINITIALIZED is also not found.
Comment 2 Andreas Schwab 2024-02-28 18:18:32 UTC
MAP_UNINITIALIZED is specific to nommu, and ignored in a normal kernel.
Comment 3 steph123 2024-03-01 15:54:41 UTC
Does that mean glibc doesn't want to support this flag?
Comment 4 Andreas Schwab 2024-03-01 18:08:24 UTC
glibc does not support nommu.
Comment 5 steph123 2024-03-01 20:40:55 UTC
That's all I wanted to know thanks...
Comment 6 steph123 2024-03-01 20:42:29 UTC
This is not a bug. See previous comments.