This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Increase slop to prevent thunk out of range again.
ClosedPublic

Authored by glandium on Nov 16 2022, 5:59 PM.

Details

Reviewers
int3
Group Reviewers
Restricted Project
Commits
rGff111a997f1b: [lld-macho] Increase slop to prevent thunk out of range again.
Summary

Building Firefox with -O0 on arm64 mac recently hit the
"FIXME: thunk range overrun" error on multiple occasions.

Doubling or tripling slop was not sufficient in some cases, so
quadruple it.

Diff Detail

Event Timeline

glandium created this revision.Nov 16 2022, 5:59 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 16 2022, 5:59 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
glandium requested review of this revision.Nov 16 2022, 5:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2022, 5:59 PM
int3 accepted this revision.Nov 16 2022, 6:08 PM
int3 added a subscriber: int3.

Thanks. We should work on a less brittle fix soon...

This revision is now accepted and ready to land.Nov 16 2022, 6:08 PM

Can you push this for me?

This revision was automatically updated to reflect the committed changes.

Thanks. We should work on a less brittle fix soon...

Yeah, we're already hitting the wall with the new value :(

thakis added a subscriber: thakis.Nov 29 2022, 8:36 AM

Did you look into where all these thunk uses are coming from?

Back when I added this hack, just 3 was enough. It feels like something changed to require way higher values. It'd be interesting to find out _what_ changed.

(I added a bunch of printf() to this code to print the barrier progress and .o files that handle it to find out which .o file hit it last time.)

I can't dig into this at the moment, but I opened an issue with a reproducer (https://github.com/llvm/llvm-project/issues/59259)