This is an archive of the discontinued LLVM Phabricator instance.

Fix nullptr access
Needs RevisionPublic

Authored by vivekvpandya on Feb 23 2020, 6:32 AM.

Details

Summary

[GlobalISel]
Do not pass nullptr in MachineOptimizationRemark constructor, as MBB pointer is used in DiagnosticInfoMIROptimization constructor and that results in nullptr access.

Diff Detail

Event Timeline

vivekvpandya created this revision.Feb 23 2020, 6:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2020, 6:32 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

Testcase? Also typo in message

vivekvpandya edited the summary of this revision. (Show Details)Feb 24 2020, 7:39 AM

Testcase? Also typo in message

I discovered this while creating basic blocks in custom instruction selection for a downstream back-end. I don't know how to write that scenario in a test.

arsenm accepted this revision.Mar 23 2020, 11:53 AM
This revision is now accepted and ready to land.Mar 23 2020, 11:53 AM

Is this still an issue? This is still null

Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2022, 7:06 PM
arsenm requested changes to this revision.Nov 16 2022, 4:20 PM

Pointing at the entry block is probably not useful, probably should just go with the function for the report

This revision now requires changes to proceed.Nov 16 2022, 4:20 PM