AK: Remove SANITIZE_PTRS support

Remove the unused SANITIZE_PTRS destructor poisoning blocks from AK
pointer wrappers. Also drop the stale Qt Creator configuration define
that referenced this old mode.
This commit is contained in:
Andreas Kling 2026-06-13 20:18:30 +02:00 committed by Andreas Kling
parent 2a0bc6a6e0
commit 7426185b9d
5 changed files with 0 additions and 21 deletions

View file

@ -13,8 +13,6 @@
#include <AK/Traits.h>
#include <AK/Types.h>
#define NONNULLOWNPTR_SCRUB_BYTE 0xf1
namespace AK {
template<typename T>
@ -48,9 +46,6 @@ public:
~NonnullOwnPtr()
{
delete m_ptr;
#ifdef SANITIZE_PTRS
m_ptr = (T*)(explode_byte(NONNULLOWNPTR_SCRUB_BYTE));
#endif
}
NonnullOwnPtr(NonnullOwnPtr const&) = delete;

View file

@ -6,8 +6,6 @@
#pragma once
#define NONNULLREFPTR_SCRUB_BYTE 0xe1
#include <AK/Assertions.h>
#include <AK/Format.h>
#include <AK/Traits.h>
@ -94,9 +92,6 @@ public:
ALWAYS_INLINE ~NonnullRefPtr()
{
unref_if_not_null(m_ptr);
#ifdef SANITIZE_PTRS
m_ptr = reinterpret_cast<T*>(explode_byte(NONNULLREFPTR_SCRUB_BYTE));
#endif
}
template<typename U>

View file

@ -11,8 +11,6 @@
#include <AK/NonnullOwnPtr.h>
#include <AK/RefCounted.h>
#define OWNPTR_SCRUB_BYTE 0xf0
namespace AK {
template<typename T>
@ -43,9 +41,6 @@ public:
~OwnPtr()
{
delete m_ptr;
#ifdef SANITIZE_PTRS
m_ptr = (T*)(explode_byte(OWNPTR_SCRUB_BYTE));
#endif
}
OwnPtr(OwnPtr const&) = delete;

View file

@ -6,8 +6,6 @@
#pragma once
#define REFPTR_SCRUB_BYTE 0xe0
#include <AK/Assertions.h>
#include <AK/Error.h>
#include <AK/Format.h>
@ -101,9 +99,6 @@ public:
ALWAYS_INLINE ~RefPtr()
{
unref_if_not_null(m_ptr);
#ifdef SANITIZE_PTRS
m_ptr = reinterpret_cast<T*>(explode_byte(REFPTR_SCRUB_BYTE));
#endif
}
template<typename U>

View file

@ -16,7 +16,6 @@ First, make sure you have a working toolchain and can build and run Ladybird. Go
* Add the following `#define`s to the file:
```
#define ENABLE_COMPILETIME_FORMAT_CHECK
#define SANITIZE_PTRS 1
```
* Edit the `ladybird.cxxflags` file to say `-std=c++23 -fsigned-char -fconcepts -fno-exceptions -fno-semantic-interposition -fPIC`
* Edit the `ladybird.includes` file to list the following lines (adapt to the actual path of your skia folder):