Skip to content

Commit 642d09f

Browse files
GregoryComerfacebook-github-bot
authored andcommitted
Increase string buffer size for tensor size errors
Summary: When improving the tensor resize error messages (D67665846), I accidentally left the string buffer size smaller than intended. This is not a memory safety issue, it just leads to the error messages being truncated. This change increases the buffer size back to the intended length. Differential Revision: D69170272
1 parent e63c923 commit 642d09f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/core/portable_type/tensor_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Error TensorImpl::internal_resize_contiguous(ArrayRef<SizesType> new_sizes) {
9595
case TensorShapeDynamism::STATIC:
9696
if (!std::equal(sizes_, sizes_ + dim_, new_sizes.begin())) {
9797
#ifdef ET_LOG_ENABLED
98-
std::array<char, 5> old_sizes_str, new_sizes_str;
98+
std::array<char, 16> old_sizes_str, new_sizes_str;
9999

100100
executorch::runtime::sizes_to_string(
101101
old_sizes_str.data(),

0 commit comments

Comments
 (0)