This is an archive of the discontinued LLVM Phabricator instance.

Protect against null dereferences
Needs ReviewPublic

Authored by akshaykhadse on Aug 26 2023, 10:00 AM.

Diff Detail

Event Timeline

akshaykhadse created this revision.Aug 26 2023, 10:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2023, 10:00 AM
akshaykhadse requested review of this revision.Aug 26 2023, 10:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2023, 10:00 AM
akshaykhadse retitled this revision from FixProtect against null dereferences to Protect against null dereferences.

Fixed clang-format issues

XinWang10 added inline comments.Sep 6 2023, 2:40 AM
llvm/lib/CodeGen/CodeGenPrepare.cpp
7071

This may be useless, we don't init TrueBranch only when TrueInstrs.size()==0.

7074

Ditto.

llvm/lib/TableGen/TGParser.cpp
585

I see ArgumentInit just have 2 kinds, so ArgName could always be inited.

llvm/lib/Target/X86/X86ISelLowering.cpp
5967

I find this is mostly called by combine*, I think the type could be legal here, so will not be 0 here? Otherwise we could crash.