-
-
Notifications
You must be signed in to change notification settings - Fork 110
[Bug]: Resource leaks detected in sootup.java.bytecode and sootup.core module #1032
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Ran the Resource Leak Checker and detected various resource leaks in both sootup.java.bytecode and sootup.core module.
Version
Latest develop branch
Relevant log output
sootup.core/src/main/java/sootup/core/util/Utils.java:[105,30]
error: [required.method.not.called] @MustCall method close may not have been invoked on fileManager or any of its aliases.
[ERROR] The type of object is: javax.tools.StandardJavaFileManager.
[ERROR] Reason for going out of scope: possible exceptional exit due to throw new IllegalArgumentException("could not compile source file."); with exception type java.lang.IllegalArgumentException
sootup.java.bytecode/src/main/java/sootup/java/bytecode/inputlocation/MultiReleaseJarAnalysisInputLocation.java:[209,22] error: [required.method.not.called] @MustCall method close may not have been invoked on inputStream or any of its aliases.
[ERROR] The type of object is: java.io.FileInputStream.
[ERROR] Reason for going out of scope: possible exceptional exit due to new JarInputStream(inputStream) with exception type java.io.IOException
sootup.java.bytecode/src/main/java/sootup/java/bytecode/inputlocation/PathBasedAnalysisInputLocation.java:[378,20] error: [required.method.not.called] @MustCall method close may not have been invoked on Files.walk(libDir) or any of its aliases.
[ERROR] The type of object is: java.util.stream.Stream<java.nio.file.Path>.
[ERROR] Reason for going out of scope: regular method exit
sootup.java.bytecode/src/main/java/sootup/java/bytecode/inputlocation/PathBasedAnalysisInputLocation.java:[445,68] error: [required.method.not.called] @MustCall method close may not have been invoked on Files.newInputStream(warFilePath) or any of its aliases.
[ERROR] The type of object is: java.io.InputStream.
[ERROR] Reason for going out of scope: possible exceptional exit due to zis.getNextEntry() with exception type java.io.IOException
sootup.java.bytecode/src/main/java/sootup/java/bytecode/inputlocation/PathBasedAnalysisInputLocation.java:[461,62] error: [required.method.not.called] @MustCall method close may not have been invoked on Files.newInputStream(file.toPath()) or any of its aliases.
[ERROR] The type of object is: java.io.InputStream.
[ERROR] Reason for going out of scope: possible exceptional exit due to zis.read(incomingValues) with exception type java.io.IOException
sootup.java.bytecode/src/main/java/sootup/java/bytecode/inputlocation/PathBasedAnalysisInputLocation.java:[487,64] error: [required.method.not.called] @MustCall method close may not have been invoked on Files.newOutputStream(file.toPath()) or any of its aliases.
[ERROR] The type of object is: java.io.OutputStream.
[ERROR] Reason for going out of scope: possible exceptional exit due to zis.read(incomingValues) with exception type java.io.IOException
sootup.java.bytecode/src/main/java/sootup/java/bytecode/inputlocation/OTFCompileAnalysisInputLocation.java:[182,30] error: [required.method.not.called] @MustCall method close may not have been invoked on fileManager or any of its aliases.
[ERROR] The type of object is: javax.tools.StandardJavaFileManager.
[ERROR] Reason for going out of scope: possible exceptional exit due to fileManager.setLocation(StandardLocation.CLASS_OUTPUT, Collections.singleton(binDir)) with exception type java.io.IOException
sootup.java.bytecode/src/main/java/sootup/java/bytecode/inputlocation/ModuleFinder.java:[283,14] error: [required.method.not.called] @MustCall method close may not have been invoked on jar or any of its aliases.
[ERROR] The type of object is: java.util.jar.JarFile.
[ERROR] Reason for going out of scope: regular method exit
sootup.java.bytecode/src/main/java/sootup/java/bytecode/inputlocation/ModuleFinder.java:[288,59] error: [required.method.not.called] @MustCall method close may not have been invoked on jar.getInputStream(entry) or any of its aliases.
[ERROR] The type of object is: java.io.InputStream.
[ERROR] Reason for going out of scope: possible exceptional exit due to new Manifest(jar.getInputStream(entry)) with exception type java.io.IOExceptionReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working