From 7426185b9d28e3fdc86f6196ccb67dbe47b07c85 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 13 Jun 2026 20:18:30 +0200 Subject: [PATCH] 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. --- AK/NonnullOwnPtr.h | 5 ----- AK/NonnullRefPtr.h | 5 ----- AK/OwnPtr.h | 5 ----- AK/RefPtr.h | 5 ----- Documentation/EditorConfiguration/QtCreatorConfiguration.md | 1 - 5 files changed, 21 deletions(-) diff --git a/AK/NonnullOwnPtr.h b/AK/NonnullOwnPtr.h index 4387ac3bff..73dc73b24d 100644 --- a/AK/NonnullOwnPtr.h +++ b/AK/NonnullOwnPtr.h @@ -13,8 +13,6 @@ #include #include -#define NONNULLOWNPTR_SCRUB_BYTE 0xf1 - namespace AK { template @@ -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; diff --git a/AK/NonnullRefPtr.h b/AK/NonnullRefPtr.h index 3e1b99e72b..f02b1e0140 100644 --- a/AK/NonnullRefPtr.h +++ b/AK/NonnullRefPtr.h @@ -6,8 +6,6 @@ #pragma once -#define NONNULLREFPTR_SCRUB_BYTE 0xe1 - #include #include #include @@ -94,9 +92,6 @@ public: ALWAYS_INLINE ~NonnullRefPtr() { unref_if_not_null(m_ptr); -#ifdef SANITIZE_PTRS - m_ptr = reinterpret_cast(explode_byte(NONNULLREFPTR_SCRUB_BYTE)); -#endif } template diff --git a/AK/OwnPtr.h b/AK/OwnPtr.h index a02cddd1fc..04730978ff 100644 --- a/AK/OwnPtr.h +++ b/AK/OwnPtr.h @@ -11,8 +11,6 @@ #include #include -#define OWNPTR_SCRUB_BYTE 0xf0 - namespace AK { template @@ -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; diff --git a/AK/RefPtr.h b/AK/RefPtr.h index c267e3b538..618f958dd1 100644 --- a/AK/RefPtr.h +++ b/AK/RefPtr.h @@ -6,8 +6,6 @@ #pragma once -#define REFPTR_SCRUB_BYTE 0xe0 - #include #include #include @@ -101,9 +99,6 @@ public: ALWAYS_INLINE ~RefPtr() { unref_if_not_null(m_ptr); -#ifdef SANITIZE_PTRS - m_ptr = reinterpret_cast(explode_byte(REFPTR_SCRUB_BYTE)); -#endif } template diff --git a/Documentation/EditorConfiguration/QtCreatorConfiguration.md b/Documentation/EditorConfiguration/QtCreatorConfiguration.md index be57bce70b..825a782c1c 100644 --- a/Documentation/EditorConfiguration/QtCreatorConfiguration.md +++ b/Documentation/EditorConfiguration/QtCreatorConfiguration.md @@ -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):