Fix issue 41928 (#48295)
Details: The issue was that verify_heap called copy_brick_card_table while another thread was growing these tables, so we ended up with a mark_array where the sections for a new segment were not committed, leading to an AV in bgc_verify_mark_array_cleared. The fix is to take the gc_lock *before* calling veriy_heap. To avoid a deadlock, the lock has to be taken before we suspend the EE. This only affects the end of a background GC, the verify_heap at the start of a background GC already happens under the gc_lock. I factored out common code into new methods enter_gc_lock_for_verify_heap and leave_gc_lock_for_verify_heap.
Showing
想要评论请 注册 或 登录