This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][GOLD] Fix PR22233 gold segfault in relocate_erratum_stub on aarch64-linux-gnu


Hello,

I've recently investigated
https://sourceware.org/bugzilla/show_bug.cgi?id=22233 which is a
segfault in gold with the --fix-cortex-a53-843419 applied.

The full details are in the PR, to summarise:
- The fix for PR21868 (an internal error when --fix-cortex-a53-843419
is applied) has a small mistake in it.
- When the stub_owner section needs an erratum fix an incorrect
address for the stubs for the section is given to
relocate_erratum_stub.
- If we are lucky we will get a segfault, if we aren't an incorrect
patch or data corruption is possible. The error is visible in PR21868,
but the side-effects aren't fatal.
- The fix is a one line change to add the view_offset to pview.address
when doing the calculation to find the stub address.

This is a first time posting a fix to this mailing list so my
apologies for missing anything out.

Peter

Attachment: fixcandidate.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]