Skip to content

Handling getCalledFunction() method #631

@BowenZhang-UST

Description

@BowenZhang-UST
  • I have searched open and closed issues for duplicates
  • I made sure that I am not using an old project version (DO: pull Phasar, update git submodules, rebuild the project and check if the bug is still there)

Bug description

Dear developers,
In lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDESecureHeapPropagation.cpp Line 88
The return value of getCalledFunction() is not checked for null, which may cause a crash if it is an inline assembly call or a function pointer call.
image
Could you have a look, thanks!

Context (Environment)

The commit I use is lattest default.

Possible solution

Change the Line 89 to:

  llvm::StringLiteral FName = "";
  if(CS->getCalledFunction()) {
    FName = CS->getCalledFunction()->getName();
  } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions