aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2024-04-10 11:03:13 +0200
committerAlexander Kriegisch <Alexander@Kriegisch.name>2024-04-10 11:23:00 +0200
commit856db5d97f329041751418b2cc43d7574e26144d (patch)
tree10893c2586a7b98fc5d48473a23499c32ba53be8 /tests/src/test
parente54ae565842527ac8cd55807649a32d17dec627e (diff)
downloadaspectj-856db5d97f329041751418b2cc43d7574e26144d.tar.gz
aspectj-856db5d97f329041751418b2cc43d7574e26144d.zip
Add IT reproducing JoinPointImpl thread-locals memory leak
Relates to #302. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/src/test')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc1922/Bugs1922Tests.java4
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc1922/ajc1922.xml14
2 files changed, 16 insertions, 2 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1922/Bugs1922Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc1922/Bugs1922Tests.java
index 06211a179..6e402fa11 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc1922/Bugs1922Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc1922/Bugs1922Tests.java
@@ -15,8 +15,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
*/
public class Bugs1922Tests extends XMLBasedAjcTestCase {
- public void testDummy() {
- //runTest("dummy");
+ public void testGitHub_302() {
+ runTest("thread-local around closure index is removed after innermost proceed");
}
public static Test suite() {
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1922/ajc1922.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1922/ajc1922.xml
index d436032e2..e10fd9975 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc1922/ajc1922.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1922/ajc1922.xml
@@ -196,4 +196,18 @@
</run>
</ajc-test>
+ <!-- https://github.com/eclipse-aspectj/aspectj/issues/302 -->
+ <ajc-test dir="bugs1922/github_302" title="thread-local around closure index is removed after innermost proceed">
+ <compile files="NestedAroundClosureMemoryLeakTest.java Task.java FirstAspect.aj SecondAspect.aj" options="-1.8 -XnoInline"/>
+ <run class="NestedAroundClosureMemoryLeakTest" vmargs="--add-opens java.base/java.lang=ALL-UNNAMED">
+ <stdout>
+ <line text="Finished executing tasks"/>
+ <line text="Number of pool threads = 12"/>
+ <line text="Test passed - all thread-locals are null"/>
+ </stdout>
+ <!-- No RuntimeException on stderr-->
+ <stderr/>
+ </run>
+ </ajc-test>
+
</suite>