You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the execution of resource leak inference on the NJR benchmark, the Checker Framework encountered a crash related to incorrect identification of the nearest enclosing element for temporary variable declarations. The current logic defaults to using the enclosing class instead of the nearest enclosing method, leading to inaccurate analysis and management of temporary variables. Due to this login the temporary vairables are being identified as a field, which lead to crash in the resource leak inference.
Commands to Reproduce
To reproduce the issue, you have two options:
Run the AInferResourceLeakAjavaTest Suite
Execute the AInferResourceLeakAjavaTest test suite, which includes a specific regression test designed to highlight this issue:
./gradlew AinferResourceLeakAjavaTest
This will run the suite, including the checker/tests/ainfer-resourceleak/non-annotated/CrashForTempVar.java test case, created to replicate this bug.
Analyze the NJR-1 Benchmark Project
Alternatively, analyze the url49fd521e8b_Kineolyan_JSpec_tgz-pJ8-fw_MainJ8 project within the NJR-1 benchmark, ensuring to enable whole program inference:
Inputs
Incorrect Current Implementation (in MustCallTransfer.java):
The proposed change is if for a created temporary variable the enclosing element will priorotize the enclosing method first, then the enclosing class.
Output
The execution of the AInferResourceLeakAjavaTest suite, particularly the test case CrashForTempVar.java, triggers a crash in the Checker Framework. This incident illustrates the critical issue with the framework's current mechanism for handling the scope of temporary variables.
Expectation
The Checker Framework should correctly identify the nearest enclosing method as the context for temporary variables, rather than erroneously defaulting to the enclosing class. Correcting this behavior is essential for accurate analysis of temporary variables, especially in complex software systems like those encountered in the NJR benchmark. This change is expected to resolve the crash and improve the framework's reliability and accuracy in resource leak inference.
The text was updated successfully, but these errors were encountered:
Description
During the execution of resource leak inference on the NJR benchmark, the Checker Framework encountered a crash related to incorrect identification of the nearest enclosing element for temporary variable declarations. The current logic defaults to using the enclosing class instead of the nearest enclosing method, leading to inaccurate analysis and management of temporary variables. Due to this login the temporary vairables are being identified as a field, which lead to crash in the resource leak inference.
Commands to Reproduce
To reproduce the issue, you have two options:
Execute the
AInferResourceLeakAjavaTest
test suite, which includes a specific regression test designed to highlight this issue:This will run the suite, including the checker/tests/ainfer-resourceleak/non-annotated/CrashForTempVar.java test case, created to replicate this bug.
Alternatively, analyze the
url49fd521e8b_Kineolyan_JSpec_tgz-pJ8-fw_MainJ8
project within the NJR-1 benchmark, ensuring to enable whole program inference:Inputs
Incorrect Current Implementation (in MustCallTransfer.java):
Proposed Correct Approach (inspired from CFGTranslationPhaseOne::findOwner):
The proposed change is if for a created temporary variable the enclosing element will priorotize the enclosing method first, then the enclosing class.
Output
The execution of the
AInferResourceLeakAjavaTest
suite, particularly the test caseCrashForTempVar.java
, triggers a crash in the Checker Framework. This incident illustrates the critical issue with the framework's current mechanism for handling the scope of temporary variables.Expectation
The Checker Framework should correctly identify the nearest enclosing method as the context for temporary variables, rather than erroneously defaulting to the enclosing class. Correcting this behavior is essential for accurate analysis of temporary variables, especially in complex software systems like those encountered in the NJR benchmark. This change is expected to resolve the crash and improve the framework's reliability and accuracy in resource leak inference.
The text was updated successfully, but these errors were encountered: