emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 069b58b: * src/alloc.c (mark_memory): Avoid signed integer overfl


From: Philipp Stephani
Subject: master 069b58b: * src/alloc.c (mark_memory): Avoid signed integer overflow
Date: Sun, 2 Aug 2020 06:59:08 -0400 (EDT)

branch: master
commit 069b58b7c852b59f8ef7642e21db339626045671
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    * src/alloc.c (mark_memory): Avoid signed integer overflow
---
 src/alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/alloc.c b/src/alloc.c
index e139d8c..be293cc 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4861,7 +4861,7 @@ mark_memory (void const *start, void const *end)
         On a host with 32-bit pointers and 64-bit Lisp_Objects,
         a Lisp_Object might be split into registers saved into
         non-adjacent words and P might be the low-order word's value.  */
-      p = (char *) ((intptr_t) p + (intptr_t) lispsym);
+      p = (char *) ((uintptr_t) p + (uintptr_t) lispsym);
       mark_maybe_pointer (p);
 
       verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT == 0);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]