soot icon indicating copy to clipboard operation
soot copied to clipboard

CombinedDUAnalysis doesn't converge

Open HJX-zhanS opened this issue 4 years ago • 6 comments

I got the same problem with #727. I want to use CombineDUAnalysis to get the DU-Chain of a method. However, I find that given some method, the CombinedDUAnalysis doesn't converge(It will not stop run forever). My code is very simple: CombinedDUAnalysis cdua = new CombinedDUAnalysis(graph) Why does the algorithm doesn't converge ? It's a bug of the algorithm of my method? How to fix it ? Thanks in advance !

HJX-zhanS avatar Oct 11 '21 02:10 HJX-zhanS

I don't know what your code looks like。Can you list the code snippet here? (Maybe you can debug your code, and see what method it's when the algorithm can not be converge)

I am interested in this problem, maybe this kind of problem , I have encountered in my analysis before.

canliture avatar Oct 11 '21 09:10 canliture

I don't know what your code looks like。Can you list the code snippet here? (Maybe you can debug your code, and see what method it's when the algorithm can not be converge)

I am interested in this problem, maybe this kind of problem have encountered in my analysis before.

Here is the code snippet, I think this problem is a bug of soot.

public static <T> T parseObject(InputStream is, Charset charset, Type type, Feature... features) throws IOException {
        if (charset == null) {
            charset = IOUtils.UTF8;
        }

        byte[] bytes = allocateBytes(65536);
        int offset = 0;

        while(true) {
            int readCount = is.read(bytes, offset, bytes.length - offset);
            if (readCount == -1) {
                return parseObject(bytes, 0, offset, (Charset)charset, type, features);
            }

            offset += readCount;
            if (offset == bytes.length) {
                byte[] newBytes = new byte[bytes.length * 3 / 2];
                System.arraycopy(bytes, 0, newBytes, 0, bytes.length);
                bytes = newBytes;
            }
        }
    }

HJX-zhanS avatar Oct 11 '21 09:10 HJX-zhanS

I think I have to reproduce the problem in my side. So What version the jar is? (it's fastjson?)

canliture avatar Oct 11 '21 09:10 canliture

I think I have to reproduce the problem in my side. So What version the jar is? (it's fastjson?)

yes, it is fastjson.

HJX-zhanS avatar Oct 11 '21 09:10 HJX-zhanS

I think I have to reproduce the problem in my side. So What version the jar is? (it's fastjson?)

yes, it is fastjson.

What the version is it?

canliture avatar Oct 11 '21 09:10 canliture

What the version is it?

1.2.24

HJX-zhanS avatar Oct 11 '21 09:10 HJX-zhanS