Skip to content

Commit 089cafc

Browse files
authored
Fix pagetable1 sweeping on 32bit (#32741)
If no pool allocations have occurred before the first GC (e.g. because MEMDEBUG was set), the pagetable1 that covers the entire (32bit) memory region on 32 bit machines may not have been initialized yet, while the corresponding sweep function was making the assumption that the passed in pagetable was non-null. Add the appropriate check for initialization.
1 parent 1ad8178 commit 089cafc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,8 @@ static void sweep_pool_pagetable(jl_taggedvalue_t ***pfl, int sweep_full) JL_NOT
13391339
{
13401340
if (REGION2_PG_COUNT == 1) { // compile-time optimization
13411341
pagetable1_t *pagetable1 = memory_map.meta1[0];
1342-
sweep_pool_pagetable1(pfl, pagetable1, sweep_full);
1342+
if (pagetable1)
1343+
sweep_pool_pagetable1(pfl, pagetable1, sweep_full);
13431344
return;
13441345
}
13451346
unsigned ub = 0;

0 commit comments

Comments
 (0)