llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Incorrect deduplication of MergeInputSection's

Open nga888 opened this issue 8 years ago • 2 comments

Bugzilla Link 36910
Resolution FIXED
Resolved on Mar 27, 2018 10:24
Version unspecified
OS Windows NT
Attachments Lit test reproducible
CC @rui314

Extended Description

When using "--icf=all --ignore-data-address-equality", MergeInputSection's whose contents are not equal may be incorrectly deduplicated.

This incorrect behaviour is caused by the fact that the Data member of MergeInputSection, which is used by ICF to check equality of contents, is always empty.

nga888 avatar Mar 26 '18 15:03 nga888

Fixed in https://reviews.llvm.org/rL328624 by Andrew Ng.

rui314 avatar Mar 27 '18 17:03 rui314

A potential fix for this bug can be found here:

https://reviews.llvm.org/D44898

nga888 avatar Mar 26 '18 15:03 nga888