Skip to content

Missing return on nullptr check #92123

Open
@apach301

Description

@apach301

Hi,

I found possible null pointer dereference with Svace static analyzer.

A return statement is missing for nullptr check of variable DI at utils/TableGen/Common/CodeGenDAGPatterns.cpp:

if (Pat->isLeaf()) {
DefInit *DI = dyn_cast<DefInit>(Pat->getLeafValue());
if (!DI)
I.error("Input $" + Pat->getName() + " must be an identifier!");
Rec = DI->getDef();
} else {

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions