Skip to content

Fix #16525: ObjectCode freed wrongly because of lack of info header check

Trịnh Tuấn Phương requested to merge lolotp/ghc:wip-16525 into master

checkUnload currently doesn't check the info header of static objects. Thus, it may free an ObjectCode struct wrongly even if there's still a live static object whose info header lies in a mapped section of that ObjectCode. This fixes the issue by adding an appropriate check.

This fixes the third item described here: #16525 (comment 192087).

Edited by Ben Gamari

Merge request reports