This is an archive of the discontinued LLVM Phabricator instance.

[CallGraphUpdater][FIX] Do not attempt to update unreachable functions
Needs RevisionPublic

Authored by jdoerfert on Oct 10 2020, 7:46 AM.

Details

Summary

In the sqlite3 build, under certain conditions, we ended up with an CG
update order in which an internal function ended up being unreachable
before CallGraphUpdate::reanalyzeFunction was called on it. That
resulted in a segfault as the function did not belong to any SCC
anymore. We now detect this and avoid to reanalyze such unreachable
functions.

I failed to simplify the 1.9MB sqlite3.bc file as conversion into .ll,
e.g., as performed by llvm-reduce, causes the problem to disappear.

Diff Detail

Event Timeline

jdoerfert created this revision.Oct 10 2020, 7:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2020, 7:46 AM
jdoerfert requested review of this revision.Oct 10 2020, 7:46 AM
uenoku accepted this revision.Oct 13 2020, 2:59 AM

LGTM

This revision is now accepted and ready to land.Oct 13 2020, 2:59 AM

Could you give an example stack trace? I'm not 100% sure this is the right fix.

Could you give an example stack trace? I'm not 100% sure this is the right fix.

Will do. Need to go back to triaging all the known Attributor bugs, though more likely next week. Anyone that can reduce Attributor bugs should feel freeto do so.

aeubanks requested changes to this revision.Jan 7 2021, 3:07 PM
This revision now requires changes to proceed.Jan 7 2021, 3:07 PM
lebedev.ri resigned from this revision.Jan 12 2023, 4:51 PM

This review seems to be stuck/dead, consider abandoning if no longer relevant.

Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 4:51 PM
Herald added a subscriber: StephenFan. · View Herald Transcript