summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseongwoo chae <mhs4670go@naver.com>2024-01-31 06:21:18 +0900
committerChunseok Lee <chunseok.lee@samsung.com>2024-02-01 16:57:07 +0900
commit5b9fb1a70172d8353cd66b8c0b93edacccf69ecf (patch)
tree4570a2a900853aae0a7d3704e86610fd3e934368
parent3612b02b0000443160b282b1e20b91488ae2533a (diff)
downloadnnfw-accepted/tizen_unified.tar.gz
nnfw-accepted/tizen_unified.tar.bz2
nnfw-accepted/tizen_unified.zip
This commit prevents an overflow from bit shifting. ONE-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
-rw-r--r--compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h b/compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h
index 205baa626..fec08993c 100644
--- a/compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h
+++ b/compiler/luci-interpreter/include/luci_interpreter/BuddyMemoryManager.h
@@ -114,7 +114,7 @@ private:
const int32_t l = lowerLog2(block->size + sizeof(Block));
const int64_t address = ((uint8_t *)block - (uint8_t *)_start_block);
- buddy = (Block *)((address ^ (1 << l)) + (uint8_t *)_start_block);
+ buddy = (Block *)((address ^ (1LL << l)) + (uint8_t *)_start_block);
if (!buddy->is_free || buddy->size != block->size)
return nullptr;