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

Authored by Phuong Trinh <lolotp@fb.com> on Apr 25 2019, 12:44 PM.

Description

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

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.

(cherry picked from commit fc6b23be509e290f8d27775a1c637284a335ed81)

Details

Committed
bgamariMon, Jun 24, 5:35 PM
Parents
rGHCcc0413b76488: Fix typo in error message
Branches
Unknown
Tags
Unknown