C++ Logo

std-proposals

Advanced search

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

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Fri, 25 Jul 2025 22:19:54 +0000
I don't know about you, but intentionally segfaulting is not something I want in my application.

And having a discussion on a feature that requires your application to be ill formed is a waste of everyone's time.

A pointer is either null, valid, or not null but invalid (if used it's a bug).
What need is there for a 4th state that is invalid, not null but another very specific value? When in all honesty null is already a good indicator that a pointer is invalid?



________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]>
Sent: Friday, July 25, 2025 9:18:44 PM
Cc: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>; std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Subject: Re: [std-proposals] Standardising 0xdeadbeef for pointers



On Friday, July 25, 2025, Oliver Hunt wrote:

If you decide carte blanche “0xbadbeef” must be an invalid pointer you’ve literally just made large allocations impossible on 32 bit machines by fracturing the address space.



Hence this discussion.







Received on 2025-07-25 22:19:58