]> git.ipfire.org Git - thirdparty/man-pages.git/commit
man/man2/mmap.2: CAVEATS: Document danger of mappings larger than PTRDIFF_MAX
authorJann Horn <jannh@google.com>
Tue, 29 Apr 2025 16:43:59 +0000 (18:43 +0200)
committerAlejandro Colomar <alx@kernel.org>
Thu, 1 May 2025 16:41:11 +0000 (18:41 +0200)
commit7e5756fdeba1a4729f817079c64f0d87fdcdadfa
tree54fac363141b53d251b6c80f5384c198803a5bfd
parentd7dec35a3b197d499c0bb2b078117478fe6382d1
man/man2/mmap.2: CAVEATS: Document danger of mappings larger than PTRDIFF_MAX

References:
 - C99 draft: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
   section "6.5.6 Additive operators", paragraph 9
 - object size restriction in GCC:
   https://gcc.gnu.org/legacy-ml/gcc/2011-08/msg00221.html
 - glibc malloc restricts object size to <=PTRDIFF_MAX in
   checked_request2size() since glibc v2.30 (released in 2019, as pointed
   out by Jakub Wilk):
   https://sourceware.org/cgit/glibc/commit/?id=9bf8e29ca136094f

Signed-off-by: Jann Horn <jannh@google.com>
Message-ID: <20250429164359.2699330-1-jannh@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/mmap.2