[Soot-list] java.lang.RuntimeException: cannot set body for non-concrete method!

Eric Bodden eric.bodden at ec-spride.de
Tue Jan 22 11:18:38 EST 2013


Michael can you maybe prepare a minimal example (including your driver
class) that would allow us to reproduce the bug?

A simple workaround would be to change processNewMethod to include...
        if( !m.hasActiveBody() ) {
            return;
        }
... but I fear that this may just be masking the actual bug.

Eric

On 22 January 2013 09:51, Michael Faes <rolve at trick17.ch> wrote:
> Hi
>
> Thank you for the answers. I'm not sure how to implement Andrea's approach
> as I'm using custom class resolving and loading code. Based on your article
> (http://www.bodden.de/2012/07/26/soot-custom-entry-points/), I understand it
> is not recommended to call the main method in that case.
>
> Michael
>
> -------- Original-Nachricht --------
> Betreff: Re: [Soot-list] java.lang.RuntimeException: cannot set body for
> non-concrete method!
> Von: Eric Bodden <eric.bodden at ec-spride.de>
> An: Andrea Mattavelli <andrea.mattavelli at usi.ch>
> Datum: 21.01.2013 18:05
>
>
>> Hello.
>>
>> The method looks as follows:
>>
>>      private void processNewMethod( SootMethod m ) {
>>          if( m.isNative() || m.isPhantom() ) {
>>              return;
>>          }
>>          Body b = m.retrieveActiveBody();
>>          getImplicitTargets( m );
>>          findReceivers(m, b);
>>      }
>>
>> I think that the check above is correct because "m" in this particular
>> setting should usually always be a concrete method. If it is not then
>> something odd has happened before. I also suspect a problem with
>> phantom refs.
>>
>> Could you try the approach that Andrea suggested to see if that helps?
>>
>> Cheers,
>> Eric
>>
>>
>



-- 
Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt


More information about the Soot-list mailing list