Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

[Sparc] Avoid writing outside array in applyFixup

Authored by dcederman on Aug 20 2018, 6:16 AM.



If an object file ends with a relocation that is smaller than 4 bytes we will write outside the Data array and trigger an "Invalid index" assertion.

Diff Detail


Event Timeline

dcederman created this revision.Aug 20 2018, 6:16 AM
jyknight accepted this revision.Aug 26 2018, 9:57 AM
jyknight added inline comments.
103 ↗(On Diff #161471)

I see this is the same way other targets do it, so, fine. But it seems rather unfortunate that this is separate from MCFixupKindInfo. And, for that matter, that applyFixup is implemented in every AsmBackend, despite doing afaict the same thing in each of them, only implemented slightly differently.


This revision is now accepted and ready to land.Aug 26 2018, 9:57 AM
This revision was automatically updated to reflect the committed changes.