Skip to content

Commit 8acc74f

Browse files
committed
Fix variable type mismatch build failure
1 parent 39c0df6 commit 8acc74f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

runtime/core/array_ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class ArrayRef final {
162162
/// slice(n, m) - Take M elements of the array starting at element N
163163
ArrayRef<T> slice(size_t N, size_t M) const {
164164
// cant slice longer then the array
165-
size_t end = 0;
165+
uint64_t end = 0;
166166
ET_CHECK(!c10::add_overflows(N, M, &end) && end <= size());
167167
return ArrayRef<T>(data() + N, M);
168168
}

runtime/core/hierarchical_allocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class HierarchicalAllocator final {
8484
size_t offset_bytes,
8585
size_t size_bytes) {
8686
// Check for integer overflow in offset_bytes + size_bytes.
87-
size_t end_bytes = 0;
87+
uint64_t end_bytes = 0;
8888
ET_CHECK_OR_RETURN_ERROR(
8989
!c10::add_overflows(offset_bytes, size_bytes, &end_bytes),
9090
InvalidArgument,

0 commit comments

Comments
 (0)