Skip to content

Commit

Permalink
Fix pagetable1 sweeping on 32bit (#32741)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Keno authored Aug 2, 2019
1 parent 1ad8178 commit 089cafc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,8 @@ static void sweep_pool_pagetable(jl_taggedvalue_t ***pfl, int sweep_full) JL_NOT
{
if (REGION2_PG_COUNT == 1) { // compile-time optimization
pagetable1_t *pagetable1 = memory_map.meta1[0];
sweep_pool_pagetable1(pfl, pagetable1, sweep_full);
if (pagetable1)
sweep_pool_pagetable1(pfl, pagetable1, sweep_full);
return;
}
unsigned ub = 0;
Expand Down

0 comments on commit 089cafc

Please sign in to comment.