Skip to content

Commit 1ae0a32

Browse files
author
Meghana Gupta
committed
Fix SAL annotations in CustomHeap::FillDebugBreak
1 parent 1127a16 commit 1ae0a32

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/Backend/InterpreterThunkEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ void InterpreterThunkEmitter::EncodeInterpreterThunk(
686686

687687

688688
inline /*static*/
689-
DWORD InterpreterThunkEmitter::FillDebugBreak(_In_ BYTE* dest, _In_ DWORD count)
689+
DWORD InterpreterThunkEmitter::FillDebugBreak(_Out_writes_bytes_all_(count) BYTE* dest, _In_ DWORD count)
690690
{
691691
#if defined(_M_ARM)
692692
Assert(count % 2 == 0);

lib/Backend/InterpreterThunkEmitter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class InterpreterThunkEmitter
113113
#endif
114114

115115
/*-------static helpers ---------*/
116-
inline static DWORD FillDebugBreak(_In_ BYTE* dest, _In_ DWORD count);
116+
inline static DWORD FillDebugBreak(_Out_writes_bytes_all_(count) BYTE* dest, _In_ DWORD count);
117117
inline static DWORD CopyWithAlignment(_Out_writes_bytes_all_(sizeInBytes) BYTE* dest, _In_ const DWORD sizeInBytes, _In_reads_bytes_(srcSize) const BYTE* src, _In_ const DWORD srcSize, _In_ const DWORD alignment);
118118
template<class T>
119119
inline static void Emit(__in_bcount(sizeof(T) + offset) BYTE* dest, __in const DWORD offset, __in const T value)

lib/Common/Memory/CustomHeap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ inline BucketId GetBucketForSize(size_t bytes)
11081108
// Fills the specified buffer with "debug break" instruction encoding.
11091109
// If there is any space left after that due to alignment, fill it with 0.
11101110
// static
1111-
void FillDebugBreak(_In_ BYTE* buffer, __in size_t byteCount)
1111+
void FillDebugBreak(_Out_writes_bytes_all_(byteCount) BYTE* buffer, _In_ size_t byteCount)
11121112
{
11131113
#if defined(_M_ARM)
11141114
// On ARM there is breakpoint instruction (BKPT) which is 0xBEii, where ii (immediate 8) can be any value, 0xBE in particular.

lib/Common/Memory/CustomHeap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,6 @@ typedef Heap<SectionAllocWrapper, PreReservedSectionAllocWrapper> OOPHeap;
572572
// Helpers
573573
unsigned int log2(size_t number);
574574
BucketId GetBucketForSize(DECLSPEC_GUARD_OVERFLOW size_t bytes);
575-
void FillDebugBreak(_In_ BYTE* buffer, __in size_t byteCount);
575+
void FillDebugBreak(_Out_writes_bytes_all_(byteCount) BYTE* buffer, _In_ size_t byteCount);
576576
} // namespace CustomHeap
577577
} // namespace Memory

0 commit comments

Comments
 (0)