Handle decoration groups with no decorations. (#1921)
In DecorationManager::RemoveDecorationsFrom, we do not remove the id from a decoration group if the group has no decorations. This causes problems because KillNamesAndDecorates is suppose to remove all references to the id, but in this case, there is still a reference. This is fixed by adding a special case. Also, there is the possibility of a double free because RemoveDecorationsFrom will delete the instructions defining |id| when |id| is a decoration group. Later, KillInst would later write to memory that has been deleted when trying to turn it into a Nop. To fix this, we will only remove the decorations that use |id| and not its definition in RemoveDecorationsFrom.
Loading
Please register or sign in to comment