[vim/vim] debugger: crash when evaluating a variable in a :def function frame (PR #21111)
Christian Brabandt (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/[email protected]> |
Problem: In the debugger ">up" and ">frame" select an older function call
frame, but get_funccal_local_ht() and the related functions check
current_funccal while returning a dictionary of the frame that
get_funccal() selected. A :def function keeps its local variables
on the vim9 stack, its funccall_T has no l: and a: dictionaries and
is allocated cleared, so with such a frame selected the returned
hashtab has a NULL ht_array and evaluating any variable name at the
debug prompt crashes in hash_lookup().
Solution: Check the funccal that is actually used and return NULL when it has
no l: variables, so that the variable is reported as undefined
instead.
You can view, comment on, or merge this pull request online at:
https://github.com/vim/vim/pull/21111
-- Commit Summary --
* debugger: crash when evaluating a variable in a :def function frame
-- File Changes --
M src/testdir/test_debugger.vim (45)
M src/userfunc.c (43)
-- Patch Links --
https://github.com/vim/vim/pull/21111.patch
https://github.com/vim/vim/pull/21111.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/21111
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/pull/[email protected]>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/21111%40github.com.