<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
committerCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

gcl (2.6.12-85) unstable; urgency=medium

  * Version_2_6_13pre81

Gbp-Pq: Name Version_2_6_13pre82

o/alloc.c

index f8470e67b2bacd0e6e40b9cac4f07553836bf556..0343ab747a979cc36ce6c3b53ea983d31761f166 100644 (file)
--- a/o/alloc.c
+++ b/o/alloc.c
@@ -349,9 +349,10 @@ resize_hole(ufixnum hp,enum type tp,bool in_placep) {
   char *start=rb_begin(),*new_start=heap_end+hp*PAGESIZE;
   ufixnum size=rb_pointer-start;
 
+#define OVERLAP(c_,t_,s_) ((t_)<(c_)+(s_) && (c_)<(t_)+(s_))
   if (!in_placep && (rb_high() ?
-                    new_start+size>rb_end :
-                    new_start+(nrbpage<<PAGEWIDTH)<start+size
+                    OVERLAP(start,new_start,size) :
+                    OVERLAP(start,new_start+(nrbpage<<PAGEWIDTH),size)
                     /* 0 (20190401  never reached)*/
                     )) {
     if (sSAnotify_gbcA->s.s_dbind != Cnil)