Vim crashes when executing system()

48 views
Skip to first unread message

Salman Halim

unread,
Sep 30, 2019, 9:57:49 AM9/30/19
to 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

unread,
Sep 30, 2019, 3:41:03 PM9/30/19
to 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

unread,
Sep 30, 2019, 9:03:10 PM9/30/19
to vim_use
Could you please find out what command string is passed to system()?

Salman Halim

unread,
Sep 30, 2019, 9:14:03 PM9/30/19
to 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.
Message has been deleted

Yasuhiro Matsumoto

unread,
Sep 30, 2019, 9:33:37 PM9/30/19
to 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

unread,
Oct 1, 2019, 8:32:49 AM10/1/19
to 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

unread,
Oct 1, 2019, 8:39:56 AM10/1/19
to Vim Users
On Mon, Sep 30, 2019 at 9:33 PM Yasuhiro Matsumoto <matt...@gmail.com> wrote:

That fixed it!

Thanks very much!

Salman
Reply all
Reply to author
Forward
0 new messages