This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Add assertions for the smart pointers with the possibility to be null in DWARFLinker::loadClangModule
ClosedPublic

Authored by OikawaKirie on Feb 22 2021, 12:52 AM.

Details

Summary

Split from D91844.

The local variable Unit in function DWARFLinker::loadClangModule in file llvm/lib/DWARFLinker/DWARFLinker.cpp. If the variable is not set in the loop below its definition, it will trigger a null pointer dereference after the loop.

Diff Detail

Event Timeline

OikawaKirie created this revision.Feb 22 2021, 12:52 AM
OikawaKirie requested review of this revision.Feb 22 2021, 12:52 AM
avl accepted this revision.Feb 23 2021, 2:06 PM

LGTM.

This revision is now accepted and ready to land.Feb 23 2021, 2:06 PM

If the revision is done, please commit it on my behalf. Thank you.

Ella Ma <alansnape3058@gmail.com>

This revision was landed with ongoing or failed builds.Feb 27 2021, 3:32 AM
This revision was automatically updated to reflect the committed changes.