From c12dfcf1f56ba06589f63f49d256efeb38b3e8d5 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 1 Jul 2019 13:18:19 +0000 Subject: Don't check the validity of newly contructed data buffers A bunch of places were checking that DataBufferHeap::GetBytes returns a non-null pointer right after constructing it. The only time when GetBytes returns a null pointer is if it is empty (and I'm not sure that even this is a good idea), but that is clearly not the case here, as the buffer was constructed with a non-zero size just a couple of lines back. llvm-svn: 364754 --- .../Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp') diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp index 3a232e054d1..9bb9e6b77ec 100644 --- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp @@ -286,13 +286,6 @@ Status NativeRegisterContextLinux_arm64::ReadAllRegisterValues( return error; uint8_t *dst = data_sp->GetBytes(); - if (dst == nullptr) { - error.SetErrorStringWithFormat("DataBufferHeap instance of size %" PRIu64 - " returned a null pointer", - REG_CONTEXT_SIZE); - return error; - } - ::memcpy(dst, &m_gpr_arm64, GetGPRSize()); dst += GetGPRSize(); ::memcpy(dst, &m_fpr, sizeof(m_fpr)); -- cgit v1.2.3