C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Standardising 0xdeadbeef for pointers

From: Thiago Macieira <thiago_at_[hidden]>
Date: Thu, 31 Jul 2025 07:49:46 -0700
On Thursday, 31 July 2025 07:35:31 Pacific Daylight Time zxuiji wrote:
> Then the answer to the potential null+-1 being valid is simple, mandate in
> the next standard that the 0+-PAGE_SIZE be premapped as sealed no rwx
> pages. That resolves the problem completely. They don't need to have
> anything mapped to them, just that they be mapped as invalid.

There's no PAGE_SIZE in the standard. Nor in POSIX, for that matter. POSIX
only has a runtime requirement for sysconf(_SC_PAGESIZE), with no required
minimum.

Without a minimum, there could hypothetically be a system with a page size of
1, which means the change you're proposing is useless.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Platform & System Engineering

Received on 2025-07-31 14:49:50