Vim crashes when executing system()

瀏覽次數:48 次
跳到第一則未讀訊息

Salman Halim

未讀,
2019年9月30日 上午9:57:492019/9/30
收件者:Vim Users
Hello,

I upgraded my GVim on Windows 10 to 8.1-2102 yesterday and now every call to system() crashed Vim. The command line just says,"Segmentation Fault" with no other details. 

This is new and happens even when started with -u NONE -U NONE.

Thank you in advance and best regards,

--

Salman

Bram Moolenaar

未讀,
2019年9月30日 下午3:41:032019/9/30
收件者:vim...@googlegroups.com、Salman Halim

Salman wrote:

> I upgraded my GVim on Windows 10 to 8.1-2102 yesterday and now every call
> to system() crashed Vim. The command line just says,"Segmentation Fault"
> with no other details.
>
> This is new and happens even when started with -u NONE -U NONE.

What was the version when it was still working?

What is 'shell' set to? And other related options:
set shell?
set shellpipe?
set shellcmdflag?
set shellquote?
set shellredir?
set shellslash?
set shelltemp?
set shellxescape?
set shellxquote?

--
ARTHUR: I command you as King of the Britons to stand aside!
BLACK KNIGHT: I move for no man.
The Quest for the Holy Grail (Monty Python)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Yasuhiro Matsumoto

未讀,
2019年9月30日 晚上9:03:102019/9/30
收件者:vim_use
Could you please find out what command string is passed to system()?

Salman Halim

未讀,
2019年9月30日 晚上9:14:032019/9/30
收件者:Vim Users
It didn't matter. I tried "ls", "diff", "svn", etc. 

--

Salman

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/c1c46e07-97b2-410d-83b1-cf6987d3241f%40googlegroups.com.
訊息已遭刪除

Yasuhiro Matsumoto

未讀,
2019年9月30日 晚上9:33:372019/9/30
收件者:vim_use


On Tuesday, October 1, 2019 at 10:14:03 AM UTC+9, Salman Halim wrote:
It didn't matter. I tried "ls", "diff", "svn", etc. 

--

Salman

On Mon, Sep 30, 2019, 21:03 Yasuhiro Matsumoto <mat...@gmail.com> wrote:
Could you please find out what command string is passed to system()?

On Monday, September 30, 2019 at 10:57:49 PM UTC+9, Salman Halim wrote:
Hello,

I upgraded my GVim on Windows 10 to 8.1-2102 yesterday and now every call to system() crashed Vim. The command line just says,"Segmentation Fault" with no other details. 

This is new and happens even when started with -u NONE -U NONE.

Thank you in advance and best regards,

--

Salman

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim...@googlegroups.com.

Salman Halim

未讀,
2019年10月1日 上午8:32:492019/10/1
收件者:Vim Users


On Mon, Sep 30, 2019 at 9:19 PM Yasuhiro Matsumoto <matt...@gmail.com> wrote:
Probably, I figure out this bug. Could you pleaes try this? (if possible)

diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 9d58ab41a..2db573a4f 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1791,8 +1791,11 @@ make_filter_cmd(
      if (p != NULL)
  *p = NUL;
  }
- STRCAT(buf, " <"); /* " < " causes problems on Amiga */
- STRCAT(buf, itmp);
+ if (itmp != NULL)
+ {
+     STRCAT(buf, " <"); /* " < " causes problems on Amiga */
+     STRCAT(buf, itmp);
+ }
  if (*p_shq == NUL)
  {
      p = find_pipe(cmd);


That alone causes this, but the crash doesn't happen:

shell returned 1
E485: Can't read file C:/Users/salman/AppData/Local/Temp/VIo223F.tmp

I'll try the patch you uploaded to github next because it contains more changes.

Thanks,

Salman
 

Salman Halim

未讀,
2019年10月1日 上午8:39:562019/10/1
收件者:Vim Users
On Mon, Sep 30, 2019 at 9:33 PM Yasuhiro Matsumoto <matt...@gmail.com> wrote:

That fixed it!

Thanks very much!

Salman
回覆所有人
回覆作者
轉寄
0 則新訊息