[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to deal with implicit call in Spark?



Thanks for the direction and
leastObject should mean any object here, right?

But consider the main method below:

    Socket socket = new Socket("127.0.0.1", 56);
    InputStream in = socket.getInputStream();

    byte[] buf = new byte[20];
    int i = in.read(buf);
    System.out.println(buf.toString());

and consider the call site in.read(buf). It looks very strange to me that:
after using spark to trim the call graph, this call site has no target
left. So it seems to me the points to set of the reference "in" is not
correct due to the native methods.


On Wed, 21 May 2003, Feng QIAN wrote:

> It is not a fault of the Spark. The side effect of native methods are
> simulated in soot/jimple/toolkits/pointer/nativemethods, for example,
> AccessController.doPrivileged is simulated in
> JavaSecurityAccessControllerNative.java. The return variable of
> doPrivileged is assigned a least object:
> NativeHelper.assignObjectTo(returnVar, Environment.v().getLeastObject());
> 
> I am not sure if this addresses your concern?
> 
> Cheers,
> -- Feng