File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
compiler-rt/lib/scudo/standalone Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,12 @@ inline bool checkPosixMemalignAlignment(uptr Alignment) {
47
47
// costly division.
48
48
inline bool checkForCallocOverflow (uptr Size, uptr N, uptr *Product) {
49
49
#if __has_builtin(__builtin_umull_overflow) && (SCUDO_WORDSIZE == 64U)
50
- return __builtin_umull_overflow (Size, N, Product);
50
+ return __builtin_umull_overflow (Size, N,
51
+ reinterpret_cast <unsigned long *>(Product));
51
52
#elif __has_builtin(__builtin_umul_overflow) && (SCUDO_WORDSIZE == 32U)
52
- return __builtin_umul_overflow (Size, N, Product);
53
+ // On, e.g. armv7, uptr/uintptr_t may be defined as unsigned long
54
+ return __builtin_umul_overflow (Size, N,
55
+ reinterpret_cast <unsigned int *>(Product));
53
56
#else
54
57
*Product = Size * N;
55
58
if (!Size)
You can’t perform that action at this time.
0 commit comments