File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -168,9 +168,9 @@ typedef enum {
168
168
} jl_callingconv_t ;
169
169
170
170
171
- // this supports up to 1 GB images and 16 RefTags
171
+ // this supports up to 8 RefTags, 512MB of pointer data, and 4/2 (64/32-bit) GB of constant data.
172
172
// if a larger size is required, will need to add support for writing larger relocations in many cases below
173
- #define RELOC_TAG_OFFSET 28
173
+ #define RELOC_TAG_OFFSET 29
174
174
175
175
176
176
/* read and write in host byte order */
@@ -1396,6 +1396,12 @@ static void jl_save_system_image_to_stream(ios_t *f)
1396
1396
jl_write_gv_ints (& s );
1397
1397
}
1398
1398
1399
+ if (sysimg .size > ((uintptr_t )1 << RELOC_TAG_OFFSET ) ||
1400
+ const_data .size > ((uintptr_t )1 << RELOC_TAG_OFFSET )* sizeof (void * )) {
1401
+ jl_printf (JL_STDERR , "ERROR: system image too large\n" );
1402
+ jl_exit (1 );
1403
+ }
1404
+
1399
1405
// step 3: combine all of the sections into one file
1400
1406
write_uint32 (f , sysimg .size - sizeof (uint32_t ));
1401
1407
ios_seek (& sysimg , sizeof (uint32_t ));
You can’t perform that action at this time.
0 commit comments