diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-03-28 13:57:10 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-27 14:46:53 +0100 |
commit | dc8f9560104f0803e53fa23bfd011aa9878d5a97 (patch) | |
tree | 88767316238e393a04f50a5a4cac4ec118cb4524 /malloc | |
parent | 0ca08c2c7b100baaebbd60744110102611f9b895 (diff) | |
download | glibc-dc8f9560104f0803e53fa23bfd011aa9878d5a97.tar glibc-dc8f9560104f0803e53fa23bfd011aa9878d5a97.tar.gz glibc-dc8f9560104f0803e53fa23bfd011aa9878d5a97.tar.bz2 glibc-dc8f9560104f0803e53fa23bfd011aa9878d5a97.zip |
cheri: malloc: avoid switch over uintptr_t
We should use a type that guarantees to represent all address bits.
In CHERI C this would be ptraddr_t, but we use unsigned long for now
not to cause regressions on other targets where this type is missing.
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/mcheck-impl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/mcheck-impl.c b/malloc/mcheck-impl.c index 00b766219b..e908bfd062 100644 --- a/malloc/mcheck-impl.c +++ b/malloc/mcheck-impl.c @@ -74,7 +74,7 @@ checkhdr (const struct hdr *hdr) an error and report it. */ return MCHECK_OK; - switch (hdr->magic ^ ((uintptr_t) hdr->prev + (uintptr_t) hdr->next)) + switch (hdr->magic ^ ((unsigned long) hdr->prev + (unsigned long) hdr->next)) { default: status = MCHECK_HEAD; |