Open Instein98 opened 4 years ago
Could you elaborate please? What is the expected behavior? Is this a bug we can fix in Soot or is it one in your mutator?
We think this is a bug of Soot because the instruction insertion is legal, but when we dump the class and run it in JVM, JVM report VerifyError. We expect that after we do the instruction insertion and dump the class, we can run it in JVM normally. It can be a bug of Soot during transforming the Jimple to a class file. In this case, Soot transforms a valid Jimple representation into an invalid class file.
, has your problem been solved? By the way, what version of soot are you using?
This problem happened when we are trying to apply two mutators to a single class file. One is the "return" mutator, trying to directly jump to the return statement. The other is the "goto" mutator, trying to jump to another statement.
Note that we use two int variables and two if statements to avoid the Soot truncating any code during optimization. And the position where those two mutators are applying is designed to trigger this error.
The java source file, the original class file, and the mutant class file are attached (classFiles.zip). By the way, I use java version "1.8.0_161".
The instructions before applying mutator:
The instructions after applying mutator:
The main code of applying mutators is as follows:
When we are trying to running the class file after mutation, it goes like: