From e18f7aaa4d1bc9f6ad4b524c25fd3f111493b774 Mon Sep 17 00:00:00 2001 From: Treeston Date: Mon, 17 Aug 2020 22:25:11 +0200 Subject: [PATCH] Scripts/Commands: Remove .debug asan outofbounds, because having reachable code that essentially says __builtin_unreachable in the core is making me twitchy. --- sql/updates/world/3.3.5/2020_08_17_00_world.sql | 2 ++ src/server/scripts/Commands/cs_debug.cpp | 10 ---------- 2 files changed, 2 insertions(+), 10 deletions(-) create mode 100644 sql/updates/world/3.3.5/2020_08_17_00_world.sql diff --git a/sql/updates/world/3.3.5/2020_08_17_00_world.sql b/sql/updates/world/3.3.5/2020_08_17_00_world.sql new file mode 100644 index 00000000000..901c5742eac --- /dev/null +++ b/sql/updates/world/3.3.5/2020_08_17_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `command` WHERE `name`='debug asan outofbounds'; diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index eab6cc6993d..1d979ee081c 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -81,7 +81,6 @@ public: static std::vector debugAsanCommandTable = { { "memoryleak", rbac::RBAC_PERM_COMMAND_DEBUG_ASAN, true, &HandleDebugMemoryLeak, "" }, - { "outofbounds", rbac::RBAC_PERM_COMMAND_DEBUG_ASAN, true, &HandleDebugOutOfBounds, "" }, }; static std::vector debugCommandTable = { @@ -1900,15 +1899,6 @@ public: return true; } - static bool HandleDebugOutOfBounds(ChatHandler* handler, CommandArgs* /*args*/) - { - uint8 stack_array[10] = {}; - int size = 10; - - handler->PSendSysMessage("Triggered an array out of bounds read at address %p, value %u", stack_array + size, stack_array[size]); - return true; - } - static bool HandleDebugMemoryLeak(ChatHandler* handler, CommandArgs* /*args*/) { uint8* leak = new uint8();