Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 20 20:34

    dependabot-preview[bot] on gradle

    (compare)

  • Apr 20 20:34
    msridhar closed #881
  • Apr 20 20:34

    msridhar on master

    Bump ant from 1.10.9 to 1.10.10… (compare)

  • Apr 20 02:10
    1054518207 opened #882
  • Apr 19 05:48
    dependabot-preview[bot] review_requested #881
  • Apr 19 05:48
    dependabot-preview[bot] labeled #881
  • Apr 19 05:48
    dependabot-preview[bot] opened #881
  • Apr 19 05:48

    dependabot-preview[bot] on gradle

    Bump ant from 1.10.9 to 1.10.10… (compare)

  • Apr 12 05:58

    dependabot-preview[bot] on gradle

    (compare)

  • Apr 12 05:58
    dependabot-preview[bot] closed #878
  • Apr 12 05:58
    dependabot-preview[bot] commented #878
  • Apr 12 05:58
    dependabot-preview[bot] review_requested #880
  • Apr 12 05:58
    dependabot-preview[bot] labeled #880
  • Apr 12 05:58
    dependabot-preview[bot] opened #880
  • Apr 12 05:58

    dependabot-preview[bot] on gradle

    Bump com.diffplug.eclipse.maven… (compare)

  • Mar 29 15:20

    juliandolby on master

    - allow overrriding of field re… block_exprs represent normal in… (compare)

  • Mar 26 14:34
    ox1234 commented #879
  • Mar 26 14:18
    ox1234 opened #879
  • Mar 24 05:34
    dependabot-preview[bot] review_requested #878
  • Mar 24 05:34
    dependabot-preview[bot] labeled #878
234235235
@234235235
Could you tell me which parameters i need to use then ?
im currently running wala as follows:
-appJar "...\TEST\JTTJDK8\main.jar" -mainClass "Lmain" -srcCaller "main" -srcCallee "finito" -out "../TEST/JTTJDK8/Out/Wala" -bt "(getInt,0)"
-bt i use for myself for customimizing backwards slicing
Linghui Luo
@linghuiluo
i dont think there is a cmd option for this. you have to call the APIs by yourself.
234235235
@234235235
Hmm okay. Is there an example somewhere or do i need to figure it out myself? ><
you can look at my code there
234235235
@234235235
thx a lot! ;)
Linghui Luo
@linghuiluo
you just need add the JavaSourceAnalysisSope
234235235
@234235235
Im trying to do it with the JavaSourceCodeAnalysisScope as you said, but unfortionally there are errors since importing in the package com.ibm.wala.cast.java and i can't use this class therefore currently
did you also run into the following errors: ?
image.png
I did import WALA into eclipse java oxygen with buildship gradle integration 3.0 and gradle version 6.4-rc-1 as well as Java jdk8, and right after importing this errors occur
Linghui Luo
@linghuiluo
no, i didn't.
This is configuration problem
if you are using maven
the wala jars should be downloaded automaticially when you configure the pom file
234235235
@234235235
So should i import the project into eclipse with maven instead of gradle?
Linghui Luo
@linghuiluo
It depends on what you want
my project i shared uses maven
234235235
@234235235
I actually programmed my own stuff already which is working on jar files, but i need to get it working on java source code
therefore i think i just need to change the analysis scope right?
so i just need to get the wala project running somewhow idc how xD
Linghui Luo
@linghuiluo
i think so, you just need to change the analysis scope
234235235
@234235235
im trying to import it as maven project now and see if it works that way ;)
234235235
@234235235
okay that even results in more errors probabbly uninstalling gradel etc will help hopefully .X
234235235
@234235235
even after cleaning i run into this error, dont know how to resolve it yet at leas t:D
Manu Sridharan
@msridhar
@234235235 check out the WALA-start project: https://github.com/wala/WALA-start It shows how to import the WALA jars from Maven Central. You should not need to clone WALA from github to run the Java source front-end analysis
234235235
@234235235
@msridhar thx a lot ;) Is there also some kind of "fuzzy parser"? Im trying to find a solution on how to build the analysis scope with java source code i.e. just providing a some (or at the start for testing just one i.e. main.java) file as input. is this possible?
in order to build a callgraph
234235235
@234235235
if i try to run it with the SourceDirectoryTreeModule i get java.lang.ClassNotFoundException: com.ibm.wala.cast.java.translator.polyglot.PolyglotSourceLoaderImpl
234235235
@234235235
So the "only" thing i need is a callgraph of a file and ideally which might be incomplete meaningn wihtout giving a main function, just that wala would generate a call graph based on a file, i would then repeat this for different files and after that combine the "local" callgraphs into a global one
because im focussing on androids framework and am unable to build a jar in containting all classes since android does not provide a "main" function in this sense
234235235
@234235235
Does any one know why exactly entry points are needed for creating a call graph in WALA?
wouldnt it be possible to create a CG without a main method?
Manu Sridharan
@msridhar
Yes, you can create a CG for programs without a main method
You just provide whatever Entrypoints you want to consider to the AnalysisOptions object
234235235
@234235235
@msridhar thx a lot thats what i needed ;)
Manu Sridharan
@msridhar
Sure thing!
Marcel Bruch
@MarcelBruch

Hi, occassionally I get errors like the following:

instruction type: class com.ibm.wala.classLoader.JavaLanguage$JavaInstructionFactory$10 call site: invokestatic < Application, Ljava/lang/invoke/LambdaMetafactory, metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; >@20 caller: Node: < Application, Lru/saidgadjiev/ormnext/core/field/FieldAccessor, makeGetter(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/invoke/MethodHandle;)Ljava/util/function/Function; > Context: DelegatingContext [A=CallStringContext: [ com.ibm.wala.FakeRootClass.fakeRootMethod()V@4 ], B=Everywhere] unexpected non-invokedynamic instruction!

Is there anything I can do about this?

Manu Sridharan
@msridhar
@MarcelBruch i think this is fixed on WALA master branch. Can you check? If it works for you I can cut a new release with the fix
8 replies
Marcel Bruch
@MarcelBruch

With the changes in master I run into problems in my code.

fun SSAInvokeInstruction.getLambdaMethod(): IMethodName {
        require(this.isLambdaMetafactoryInvoke()) { "instruction is not a call to LambdaMetafactory" }
        require(this is SSAInvokeDynamicInstruction){"instruction is not a SSAInvokeDynamicInstruction: $this"} // here it fails
        val cp = bootstrap.cp // <— how do I get access to the bootstrap? I’m looking for the method that get’s invoked.
        val index = (0 until bootstrap.callArgumentCount()).first { bootstrap.callArgumentKind(it) == ClassConstants.CONSTANT_MethodHandle.toInt() }.let { bootstrap.callArgumentIndex(it) }
        val methodName = "L${cp.getCPHandleClass(index)}.${cp.getCPHandleName(index)}${cp.getCPHandleType(index)}"
        return VmMethodName.of(methodName)
    }

The cast fails (it’s not a SSAInvokeDynamic anymore). But w/o that cast i don’t get access to the bootstrap object. How would I solve this now?

Marcel Bruch
@MarcelBruch
@msridhar ^ (but it doesn’t fail in all cases - sometimes it is an SSAInvokeDynamicInstrcution, sometimes it’s not)
Manu Sridharan
@msridhar
@MarcelBruch are you analyzing JDK11 bytecodes? That may be the issue; we haven't tested that much.
Marcel Bruch
@MarcelBruch
I’m not exactly sure but that’s likely true. I’m analyzing (parts of ) maven central.
Manu Sridharan
@msridhar
If there's any way you could provide a repro test case and file an issue, that would be great