Version_2_6_13pre82
authorCamm Maguire <camm@debian.org>
Sun, 8 Dec 2019 19:27:24 +0000 (19:27 +0000)
committerCamm Maguire <camm@debian.org>
Sun, 8 Dec 2019 19:27:24 +0000 (19:27 +0000)
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)