comparison src/structs.h @ 33503:f72004b37b2b v9.0.2001

patch 9.0.2001: Vim9: segfault with islocked() Commit: https://github.com/vim/vim/commit/9771b2a67f825bdc6e5c615141d22c665952dc86 Author: Ernie Rael <errael@raelity.com> Date: Sat Oct 7 22:05:40 2023 +0200 patch 9.0.2001: Vim9: segfault with islocked() Problem: Vim9: segfault with islocked() Solution: Check that the lval pointer is not null for objects and class variables closes: #13295 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ernie Rael <errael@raelity.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 07 Oct 2023 22:15:09 +0200
parents 4a62e78803db
children 1f9b1def80c8
comparison
equal deleted inserted replaced
33502:4c2e97be0fbe 33503:f72004b37b2b
4545 * "name" points to the (expanded) variable name. 4545 * "name" points to the (expanded) variable name.
4546 * "exp_name" NULL or non-NULL, to be freed later. 4546 * "exp_name" NULL or non-NULL, to be freed later.
4547 * "tv" points to the (first) list item value 4547 * "tv" points to the (first) list item value
4548 * "li" points to the (first) list item 4548 * "li" points to the (first) list item
4549 * "range", "n1", "n2" and "empty2" indicate what items are used. 4549 * "range", "n1", "n2" and "empty2" indicate what items are used.
4550 * For a member in a class/object: TODO: verify fields 4550 * For a plain class or object:
4551 * "name" points to the variable name.
4552 * "exp_name" is NULL.
4553 * "tv" points to the variable
4554 * "is_root" TRUE
4555 * For a variable in a class/object: (class is not NULL)
4551 * "name" points to the (expanded) variable name. 4556 * "name" points to the (expanded) variable name.
4552 * "exp_name" NULL or non-NULL, to be freed later. 4557 * "exp_name" NULL or non-NULL, to be freed later.
4553 * "tv" points to the (first) list item value 4558 * "tv" May point to class/object variable.
4554 * "oi" index into member array, see _type to determine which array 4559 * "object" object containing variable, NULL if class variable
4560 * "class" class of object or class containing variable
4561 * "oi" index into class/object of tv
4555 * For an existing Dict item: 4562 * For an existing Dict item:
4556 * "name" points to the (expanded) variable name. 4563 * "name" points to the (expanded) variable name.
4557 * "exp_name" NULL or non-NULL, to be freed later. 4564 * "exp_name" NULL or non-NULL, to be freed later.
4558 * "tv" points to the dict item value 4565 * "tv" points to the dict item value
4559 * "newkey" is NULL 4566 * "newkey" is NULL
4589 blob_T *ll_blob; // The Blob or NULL 4596 blob_T *ll_blob; // The Blob or NULL
4590 ufunc_T *ll_ufunc; // The function or NULL 4597 ufunc_T *ll_ufunc; // The function or NULL
4591 object_T *ll_object; // The object or NULL, class is not NULL 4598 object_T *ll_object; // The object or NULL, class is not NULL
4592 class_T *ll_class; // The class or NULL, object may be NULL 4599 class_T *ll_class; // The class or NULL, object may be NULL
4593 int ll_oi; // The object/class member index 4600 int ll_oi; // The object/class member index
4594 int ll_is_root; // Special case. ll_tv is lval_root, 4601 int ll_is_root; // TRUE if ll_tv is the lval_root, like a
4595 // ignore the rest. 4602 // plain object/class. ll_tv is variable.
4596 } lval_T; 4603 } lval_T;
4597 4604
4598 /** 4605 /**
4599 * This may be used to specify the base type that get_lval() uses when 4606 * This may be used to specify the base type that get_lval() uses when
4600 * following a chain, for example a[idx1][idx2]. 4607 * following a chain, for example a[idx1][idx2].