Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

How to cancel copy propagation during the process of converting Java bytecode into sdg file? #15

@Andres981231

Description

@Andres981231

I want to perform a taint analysis using Joana, and the sinks I annotate are the SDGNodes with the kind of expression. However, I found that Phi Nodes can not be annotated as source or sink. As the figure showed below.
dfdd83070d71b5241f3ce7ed5b4816e
Moreover, I have also found that the Phi nodes in sdg file seems do not correctly record its position in source code (red block) and bytecode (green block). I wonder that whether this is a special implementation or just a bug in Joana.
4581d3a8307993e3dd2cc79c5ab8ec5
Then I studied a specific case, the source code and the sdg file are showed below.
f974044ef0eddec96fed77fca528a52
48d4431a8bc9b9745ee6be0da83796d
I have noticed that the assigment instructions of variables like max and richer are taken as PHI Nodes (blue block) and they are seperated from the Instructions (red block). However, the original assignment instructions after two if statement instructions are missed (green block). I think that these instructions are likely to be eliminated by copy propagation optimization during the process of converting Java bytecode into sdg file. So I want to cancel this in order to get assigment instructions and annotate them as sink instead of annotating PHI nodes. I wonder whether the joana team is aware of where do they perform the copy propagation and can give me some hints. Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions