-
-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0' When performing instrumentation by soot. #2093
Comments
Hi @Mlecherf , do you mean I can upload my source code via Mediafire? |
Can you provide a minimum working example? If you have a large analyzer, we don't have the time to debug into that. Please provide a small program thta is just enough to reproduce the problem. |
Hi@StevenArzt , sorry for my late reply. I didn't encounter this issue again, but I encountered another strange issue now. 15: invokestatic #161 // InterfaceMethod org/apache/hadoop/hbase/master/LoadBalancer.isMasterCanHostUserRegions:(Lorg/apache/hadoop/conf/Configuration;)Z After soot regeneration, this line of bytecode becomes: 16: invokestatic #1920 // Method org/apache/hadoop/hbase/master/LoadBalancer.isMasterCanHostUserRegions:(Lorg/apache/hadoop/conf/Configuration;)Z When I start hbase master, an error will be reported: That is, this method should be an InterfaceMethod instead of a Method
I'm not explicitly calling asm to modify the binary, so is this because I've turned on some optimization switch incorrectly? How can I fix this error? |
Here are the class files before and after analysis. |
Please examine each of the following points so that we can help you as soon and best as possible.
Describe the bug
After instrumenting HBase(2.4.2) and generating .class files, I met this issues:
[Thread-44] ERROR heros.solver.CountingThreadPoolExecutor - Worker thread execution failed: Index 0 out of bounds for length 0
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at org.objectweb.asm.MethodWriter.visitParameterAnnotation(MethodWriter.java:703)
at soot.AbstractASMBackend.generateMethods(AbstractASMBackend.java:347)
at soot.AbstractASMBackend.generateByteCode(AbstractASMBackend.java:277)
at soot.AbstractASMBackend.generateClassFile(AbstractASMBackend.java:226)
at soot.PackManager.writeClass(PackManager.java:1124)
at soot.PackManager.lambda$writeOutput$1(PackManager.java:705)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Input file
I utilized soot-4.3.0 and download Hbase hbase-2.4.2-bin.tar.gz. My source code is too large to upload. If necessary, I will upload my analyzer to support reproducing.
To reproduce
Steps to reproduce the behavior:
Run my scripts.
Expected behavior
According to the log info, the instrumentation process finished and the error occurred during generating .class files.
The text was updated successfully, but these errors were encountered: