Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing <operators> #111

Closed
popthink opened this issue Mar 16, 2021 · 1 comment · Fixed by #115
Closed

missing <operators> #111

popthink opened this issue Mar 16, 2021 · 1 comment · Fixed by #115
Assignees

Comments

@popthink
Copy link
Contributor

popthink commented Mar 16, 2021

If I am right.

Soot.InstanceOfExpr should be handled.

I will figure out how AST tree should be composed and make a PR tomorrow.

  • .instanceOf
 ?? https://github.com/ShiftLeftSecurity/codepropertygraph/blob/master/fuzzyc2cpg/src/main/java/io/shiftleft/fuzzyc2cpg/ast/expressions/InstanceofExpression.java
  • .new
  Call(
    id -> 1000140L,
    code -> "new Something()",
    name -> "<operator>.new",
    order -> 2,
    methodFullName -> "<operator>.new",
    argumentIndex -> 2,
    signature -> "TODO",
    lineNumber -> Some(value = 30),
    columnNumber -> Some(value = 28),
    methodInstFullName -> None,
    typeFullName -> "",
    depthFirstOrder -> None,
    internalFlags -> None,
    dispatchType -> "STATIC_DISPATCH",
    dynamicTypeHintFullName -> List()
  ),

override def visit(astNew: NewExpression): Unit = {
    val call = newCallNode(astNew, "<operator>.new")

    diffGraph.addNode(call)
    connectAstChild(call)
    pushContext(call, 1)
    context.addArgumentEdgeOnNextAstEdge = true
    astNew.getTargetClass.accept(this)
    astNew.getArgumentList.accept(this)
    popContext()
  }

@popthink popthink changed the title <operator>.instanceOf is missing missing <operators> Mar 16, 2021
@popthink
Copy link
Contributor Author

Sub-issue of #93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants