Hi Timo,
2015-12-12(Sat) 16:59:21 UTC+9 Timo Mihaljov:
> I'm experiencing random segmentation faults in GVim when searching the
> file list in the vim-ctrlspace plugin. I don't have a reliable way to
> reproduce the issue, but I've been running GVim in GDB and dumping the
> backtrace and locals after every crash (attached as vim_backtrace_*).
>
> All the backtraces look essentially the same, with the top of the
> stack looking like this:
>
> #0 0x000000000041ec3d in getvcol (wp=0x1742620, pos=0x1742650,
> start=0x8ac470 <preedit_start_col>, cursor=0x0, end=0x0) at
> charset.c:1321
> #1 0x00000000004ffc23 in init_preedit_start_col () at mbyte.c:4545
> #2 0x00000000004fff8f in im_commit_cb (context=0xfa89b0,
> str=0x1ae8e60 "s", data=0x0) at mbyte.c:4711
>
> The line where the segmentation fault happens (charset.c:1321) is in
> void getvcol(wp, pos, start, cursor, end):
>
> int ts = wp->w_buffer->b_p_ts;
>
> All backtraces are recorded on GVim built from Git commit
> e392eb41f8dfc01bd13634e534ac6b4d505326f4 with debugging symbols added
> and stripping disabled but no other local changes.
>
> For details of my Vim installation, see the attached bugreport.txt.
I can not reproduce it.
But I make a patch to Avoid SEGV in preedit finish.
Can you try this patch?
Thanks
--
Best regards,
Hirohito Higashi (a.k.a h_east)
--
--
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].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/mbyte.c b/src/mbyte.c
index 6046d7d..edca9a7 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4541,7 +4541,7 @@ init_preedit_start_col(void)
{
if (State & CMDLINE)
preedit_start_col = cmdline_getvcol_cursor();
- else if (curwin != NULL)
+ else if (curwin != NULL && curwin->w_buffer != NULL)
getvcol(curwin, &curwin->w_cursor, &preedit_start_col, NULL, NULL);
/* Prevent that preediting marks the buffer as changed. */
xim_changed_while_preediting = curbuf->b_changed;