This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Add test case triggering JT assertion
ClosedPublic

Authored by rafauler on Nov 17 2022, 4:18 PM.

Details

Reviewers
Amir
maksfb
Group Reviewers
Restricted Project
Commits
rGe09f6f41cae8: [BOLT] Add test case triggering JT assertion
Summary

Current case that triggers BOLT assertion. Marked XFAIL.
In this test case, we reproduce the behavior seen in gcc where the
base address of a jump table is decremented by some number and ends up
at the exact addess of a jump table from another function. After
linking, the instruction references another jump table and that
confuses BOLT.

Diff Detail

Event Timeline

rafauler created this revision.Nov 17 2022, 4:18 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
rafauler requested review of this revision.Nov 17 2022, 4:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2022, 4:18 PM
rafauler updated this revision to Diff 476271.Nov 17 2022, 4:29 PM

Add XFAIL. Expand intro.

rafauler edited the summary of this revision. (Show Details)Nov 17 2022, 4:30 PM
rafauler edited the summary of this revision. (Show Details)
rafauler retitled this revision from [RFC][BOLT] Add test of a jump table crash to [BOLT] Add test case triggering JT assertion.
Amir accepted this revision.Jan 3 2023, 5:37 PM
This revision is now accepted and ready to land.Jan 3 2023, 5:37 PM
This revision was automatically updated to reflect the committed changes.

this test unexpectedly passes in non-assert builds of bolt, causing check-bolt to fail

Amir added a comment.Jan 16 2023, 9:32 PM

Thanks! Do you have a buildbot running with non-assert build mode?

aeubanks added a comment.EditedJan 16 2023, 9:42 PM

Thanks! Do you have a buildbot running with non-assert build mode?

Chrome clang packaging recently started building bolt (for bootstrapping clang, plus experimentation) and our official toolchain releases build without asserts and run check-all
(I can provide links to some builds if you want but right now the process is fairly ad hoc)