Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6aa081b

Browse files
authored
Merge pull request#242 from visitorckw/fix-signed-integer-overflow
Fix signed integer overflow by casting to uint32_t
2 parents23622ee +03e346d commit6aa081b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/uTensor/allocators/arenaAllocator.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespaceuTensor {
1414

1515
//#define MSB_SET ~( ~( (T)0 ) >> 1 )
16-
#defineMSB_SET (1 << (sizeof(uint32_t) *8 -1))
16+
#defineMSB_SET ((uint32_t)1 << (sizeof(uint32_t) *8 -1))
1717
#defineBLOCK_INACTIVE ~MSB_SET
1818
#defineBLOCK_LENGTH_MASK ~MSB_SET
1919
#defineBLOCK_ACTIVE MSB_SET

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp