We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4517290 + 5c49ec8 commit 1264ec6Copy full SHA for 1264ec6
source/loader/layers/sanitizer/asan_buffer.cpp
@@ -183,8 +183,8 @@ size_t MemBuffer::getAlignment() {
183
// usually choose a very large size (more than 1k). Then sanitizer will
184
// allocate extra unnessary memory. Not sure if this will impact
185
// performance.
186
- size_t MsbIdx = 63 - __builtin_clz(Size);
187
- size_t Alignment = (1 << (MsbIdx + 1));
+ size_t MsbIdx = 63 - __builtin_clzl(Size);
+ size_t Alignment = (1ULL << (MsbIdx + 1));
188
if (Alignment > 128) {
189
Alignment = 128;
190
}
0 commit comments