Scripts/Commands: Remove .debug asan outofbounds, because having reachable code that essentially says __builtin_unreachable in the core is making me twitchy.

This commit is contained in:
Treeston
2020-08-17 22:25:11 +02:00
parent 426513ec8e
commit e18f7aaa4d
2 changed files with 2 additions and 10 deletions

View File

@@ -0,0 +1,2 @@
--
DELETE FROM `command` WHERE `name`='debug asan outofbounds';

View File

@@ -81,7 +81,6 @@ public:
static std::vector<ChatCommand> debugAsanCommandTable =
{
{ "memoryleak", rbac::RBAC_PERM_COMMAND_DEBUG_ASAN, true, &HandleDebugMemoryLeak, "" },
{ "outofbounds", rbac::RBAC_PERM_COMMAND_DEBUG_ASAN, true, &HandleDebugOutOfBounds, "" },
};
static std::vector<ChatCommand> 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();