Skip to content

Possible NULL dereference in llvm/Transforms/Scalar #157450

@apach301

Description

@apach301

Hi,

I found possible null pointer dereference with Svace static analyzer.

A SIUse pointer is checked on NULL and then dereferenced while casting in isValidSelectInst() at llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp:

Instruction *SIUse = dyn_cast<Instruction>(SI->user_back());
// The use of the select inst should be either a phi or another select.
if (!SIUse && !(isa<PHINode>(SIUse) || isa<SelectInst>(SIUse)))
return false;

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