]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-131740: Update PyUnstable_GC_VisitObjects to traverse perm gen (gh-131744)
authorDonghee Na <donghee.na@python.org>
Wed, 26 Mar 2025 00:45:29 +0000 (09:45 +0900)
committerGitHub <noreply@github.com>
Wed, 26 Mar 2025 00:45:29 +0000 (09:45 +0900)
Misc/NEWS.d/next/C_API/2025-03-26-06-56-40.gh-issue-131740.9PdxxQ.rst [new file with mode: 0644]
Python/gc.c

diff --git a/Misc/NEWS.d/next/C_API/2025-03-26-06-56-40.gh-issue-131740.9PdxxQ.rst b/Misc/NEWS.d/next/C_API/2025-03-26-06-56-40.gh-issue-131740.9PdxxQ.rst
new file mode 100644 (file)
index 0000000..585f07a
--- /dev/null
@@ -0,0 +1 @@
+Update PyUnstable_GC_VisitObjects to traverse perm gen.
index a2ec0e567b5e39d8480feb4dc541731846067492..8d7f6ac2f3ab53b1c49a415720c0cabdeb52ee8b 100644 (file)
@@ -2415,7 +2415,10 @@ PyUnstable_GC_VisitObjects(gcvisitobjects_t callback, void *arg)
     if (visit_generation(callback, arg, &gcstate->old[0])) {
         goto done;
     }
-    visit_generation(callback, arg, &gcstate->old[1]);
+    if (visit_generation(callback, arg, &gcstate->old[1])) {
+        goto done;
+    }
+    visit_generation(callback, arg, &gcstate->permanent_generation);
 done:
     gcstate->enabled = origenstate;
 }