wala/ML

Callable identification should be further up the analysis

開放

#207 建立於 2024年7月19日

 (0 則留言) (0 個反應) (0 位負責人)Java (17 個分叉)auto 404
enhancementhelp wanted

倉庫指標

星標
 (27 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Related to https://github.com/wala/WALA/discussions/1417#discussioncomment-10085680

In the current callable identification code, we are seeing imprecision in identifing the callable when there's multiple possible receivers according to the PA. This could happen for a number of reasons (one test case is added in https://github.com/ponder-lab/ML/pull/121), but what we are seeing is that if the call stack is sufficiently deep, we lose the ability to distinguish objects in the PA. Another reason could be due to dynamic dispatch, though we haven't tested it yet.

The reason we are using PA in the first place is because the receiver comes to use as just an object with no other information. If we explicitly call __call__(), the receiver is instead a trampoline. Thus, it would seem to me that calls to objects need to be distinguished before we get to com.ibm.wala.ipa.callgraph.MethodTargetSelector.getCalleeTarget(). In other words, while this method works for a bunch of cases, I don't think it's the correct place to do it properly. Instead, we should figure out how to make the receiver the same as it was called explicitly.`

貢獻者指南