forked from OSchip/llvm-project
hwasan: Allow range of frame descriptors to be empty.
As of r349413 it's now possible for a binary to contain an empty hwasan frame section. Handle that case simply by doing nothing. Differential Revision: https://reviews.llvm.org/D55796 llvm-svn: 349428
This commit is contained in:
parent
06caa6d2e6
commit
44ea4f5744
|
@ -229,8 +229,8 @@ static InternalMmapVectorNoCtor<FrameDescriptionArray> AllFrames;
|
|||
void InitFrameDescriptors(uptr b, uptr e) {
|
||||
FrameDescription *beg = reinterpret_cast<FrameDescription *>(b);
|
||||
FrameDescription *end = reinterpret_cast<FrameDescription *>(e);
|
||||
// Must have at least one entry, which we can use for a linked list.
|
||||
CHECK_GE(end - beg, 1U);
|
||||
if (beg == end)
|
||||
return;
|
||||
AllFrames.push_back({beg, end});
|
||||
if (Verbosity())
|
||||
for (FrameDescription *frame_descr = beg; frame_descr < end; frame_descr++)
|
||||
|
|
Loading…
Reference in New Issue