summaryrefslogtreecommitdiffstats
path: root/src/proto
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2023-09-04 07:51:01 +0200
committerChristian Brabandt <cb@256bit.org>2023-09-04 07:51:01 +0200
commite651e110c17656a263dd017b14c85b332163a58d (patch)
tree5aed78b4cba519728d28960297d9390944e02d1c /src/proto
parent233f956bd43279db1fb4d017acb4e56a1504addf (diff)
patch 9.0.1862: Vim9 Garbage Collection issuesv9.0.1862
Problem: Vim9 Garbage Collection issues Solution: Class members are garbage collected early leading to use-after-free problems. Handle the garbage collection of classes properly. closes: #13019 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/proto')
-rw-r--r--src/proto/eval.pro1
-rw-r--r--src/proto/vim9class.pro2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index 1fb36c217c..d94e8ad03b 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -59,6 +59,7 @@ int set_ref_in_dict(dict_T *d, int copyID);
int set_ref_in_list(list_T *ll, int copyID);
int set_ref_in_list_items(list_T *l, int copyID, ht_stack_T **ht_stack);
int set_ref_in_callback(callback_T *cb, int copyID);
+int set_ref_in_item_class(class_T *cl, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack);
int set_ref_in_item(typval_T *tv, int copyID, ht_stack_T **ht_stack, list_stack_T **list_stack);
char_u *echo_string_core(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val);
char_u *echo_string(typval_T *tv, char_u **tofree, char_u *numbuf, int copyID);
diff --git a/src/proto/vim9class.pro b/src/proto/vim9class.pro
index 5fa0ab2591..e685c03691 100644
--- a/src/proto/vim9class.pro
+++ b/src/proto/vim9class.pro
@@ -12,6 +12,8 @@ void copy_object(typval_T *from, typval_T *to);
void object_unref(object_T *obj);
void copy_class(typval_T *from, typval_T *to);
void class_unref(class_T *cl);
+int class_free_nonref(int copyID);
+int set_ref_in_classes(int copyID);
void object_created(object_T *obj);
void object_cleared(object_T *obj);
int object_free_nonref(int copyID);