C++ Logo

std-proposals

Advanced search

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

From: Jeremy Rifkin <rifkin.jer_at_[hidden]>
Date: Thu, 31 Jul 2025 09:59:11 -0500
> So we're designing for lala land where any and all silly systems exist
are we?

Well, this whole thread is an exercise in silly design. Unless I’ve missed
it the author has yet to acknowledge better approaches like using address
sanitizer.

Cheers,
Jeremy

On Thu, Jul 31, 2025 at 09:54 zxuiji via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> So we're designing for lala land where any and all silly systems exist are
> we? Just define a minimum based on real world standards which as far as I'm
> aware is 512 minimum which is reasonable enough for a `MIN_PAGE_SIZE 512`
> macro and certainly reasonable for a `MAX_INVALID_ADDRESS ((void*)512)`
> macro
>
> On Thu, 31 Jul 2025 at 15:49, Thiago Macieira <thiago_at_[hidden]> wrote:
>
>> 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
>>
>>
>>
>> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2025-07-31 14:59:26