[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6ec71e8: * src/alloc.c (mark_maybe_object): Make overflow check c
From: |
Philipp Stephani |
Subject: |
master 6ec71e8: * src/alloc.c (mark_maybe_object): Make overflow check conditional. |
Date: |
Sat, 1 Aug 2020 15:35:12 -0400 (EDT) |
branch: master
commit 6ec71e829a272e562c541ef5c93213d2fac3d3d7
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>
* src/alloc.c (mark_maybe_object): Make overflow check conditional.
---
src/alloc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/alloc.c b/src/alloc.c
index e556fc8..e139d8c 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4643,7 +4643,13 @@ mark_maybe_object (Lisp_Object obj)
bool overflow
= INT_SUBTRACT_WRAPV (offset, LISP_WORD_TAG (type_tag), &offset);
+#if !defined WIDE_EMACS_INT || USE_LSB_TAG
+ /* If we don't use wide integers, then `intptr_t' should always be
+ large enough to not overflow. Furthermore, when using the least
+ significant bits as tag bits, the tag is small enough to not
+ overflow either. */
eassert (!overflow);
+#endif
void *po = (char *) ((intptr_t) (char *) XLP (obj) + offset);
/* If the pointer is in the dump image and the dump has a record
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6ec71e8: * src/alloc.c (mark_maybe_object): Make overflow check conditional.,
Philipp Stephani <=