summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-14 18:14:37 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-14 18:14:37 +0000
commit7509ad8b0fad56f88288977decbeca3640406c82 (patch)
treebd5e3baad50de512990bb3ba1257452d4bf5f244 /src/structs.h
parent919c12c19a9785b856bc32dfe6cd8e9277178b62 (diff)
downloadvim-git-7509ad8b0fad56f88288977decbeca3640406c82.tar.gz
patch 8.2.3809: Vim9: crash when garbage collecting a nested partialv8.2.3809
Problem: Vim9: crash when garbage collecting a nested partial. (Virginia Senioria) Solution: Set references in all the funcstacks. (closes #9348)
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/structs.h b/src/structs.h
index 5b7739ed5..9aad4152e 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -2009,8 +2009,13 @@ typedef struct {
* Structure to hold the context of a compiled function, used by closures
* defined in that function.
*/
-typedef struct funcstack_S
+typedef struct funcstack_S funcstack_T;
+
+struct funcstack_S
{
+ funcstack_T *fs_next; // linked list at "first_funcstack"
+ funcstack_T *fs_prev;
+
garray_T fs_ga; // contains the stack, with:
// - arguments
// - frame
@@ -2021,7 +2026,7 @@ typedef struct funcstack_S
int fs_refcount; // nr of closures referencing this funcstack
int fs_min_refcount; // nr of closures on this funcstack
int fs_copyID; // for garray_T collection
-} funcstack_T;
+};
typedef struct outer_S outer_T;
struct outer_S {