From 46688f960dc784a8cfb1cb81e05db3786efebaca Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 31 Jul 2009 23:23:29 -0500 Subject: [PATCH] image.cpp: don't try to make code heap bigger than p->code_size since on PPC this will cause crashes if the image has a code heap of exactly 32Mb --- vm/image.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vm/image.cpp b/vm/image.cpp index f8aa07ded9..de9de1acf1 100755 --- a/vm/image.cpp +++ b/vm/image.cpp @@ -53,10 +53,8 @@ cell code_relocation_base; static void load_code_heap(FILE *file, image_header *h, vm_parameters *p) { - cell good_size = h->code_size + (1 << 19); - - if(good_size > p->code_size) - p->code_size = good_size; + if(h->code_size > p->code_size) + fatal_error("Code heap too small to fit image",h->code_size); init_code_heap(p->code_size);