diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-03-28 13:57:10 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-08-05 19:45:19 +0100 |
commit | 257781e305b49b3fd4a9b23f8279ded07a395e29 (patch) | |
tree | f1c85b9e844d338d0896c856e660885f7d54a26e | |
parent | 6af67120e8d889f1595d9d066d7798a8fba8a9db (diff) | |
download | glibc-257781e305b49b3fd4a9b23f8279ded07a395e29.tar glibc-257781e305b49b3fd4a9b23f8279ded07a395e29.tar.gz glibc-257781e305b49b3fd4a9b23f8279ded07a395e29.tar.bz2 glibc-257781e305b49b3fd4a9b23f8279ded07a395e29.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.
-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; |