<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/os, branch v0.2.1</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>pty_process_win: avoid quoting for cmd.exe</title>
<updated>2017-08-16T07:13:44+00:00</updated>
<author>
<name>erw7</name>
<email>erw7.github@gmail.com</email>
</author>
<published>2017-04-14T13:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=8c1782b84070d786cc1a7dfd6242a9ebc0923ad3'/>
<id>8c1782b84070d786cc1a7dfd6242a9ebc0923ad3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win/pty: log errors</title>
<updated>2017-08-16T07:13:44+00:00</updated>
<author>
<name>erw7</name>
<email>erw7.github@gmail.com</email>
</author>
<published>2017-04-02T09:32:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=d3a8c4f99289f7b65a68bf9ed5eeab34aa688e0e'/>
<id>d3a8c4f99289f7b65a68bf9ed5eeab34aa688e0e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win/pyt: cleanup</title>
<updated>2017-08-16T07:13:44+00:00</updated>
<author>
<name>erw7</name>
<email>erw7.github@gmail.com</email>
</author>
<published>2017-04-02T09:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=84fb794da653fc3bcc2832816ca0cab01b4e0400'/>
<id>84fb794da653fc3bcc2832816ca0cab01b4e0400</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win/pty: quote_cmd_arg(): check bounds</title>
<updated>2017-08-16T07:13:43+00:00</updated>
<author>
<name>erw7</name>
<email>erw7.github@gmail.com</email>
</author>
<published>2017-03-30T09:30:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=3b992f16889b45215ab6f867edaec5201776d579'/>
<id>3b992f16889b45215ab6f867edaec5201776d579</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win/pty: jobstart, jobstop: fix null-pointer dereference</title>
<updated>2017-08-16T07:13:43+00:00</updated>
<author>
<name>erw7</name>
<email>erw7.github@gmail.com</email>
</author>
<published>2017-03-29T12:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e635754e8e9a92d1537ccc980c63eaa2e9d732bb'/>
<id>e635754e8e9a92d1537ccc980c63eaa2e9d732bb</id>
<content type='text'>
- Make sure that proc-&gt;in is not NULL, because nvim crashed when
  starting a job with pty.
- Make sure that proc-&gt;out is not NULL, because nvim crashed when stopping
  a job opened with pty.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Make sure that proc-&gt;in is not NULL, because nvim crashed when
  starting a job with pty.
- Make sure that proc-&gt;out is not NULL, because nvim crashed when stopping
  a job opened with pty.
</pre>
</div>
</content>
</entry>
<entry>
<title>win: support :terminal</title>
<updated>2017-08-16T07:13:43+00:00</updated>
<author>
<name>erw7</name>
<email>erw7.github@gmail.com</email>
</author>
<published>2017-03-28T09:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=4b1f21de75f9981007d80aca8355239e8615d6bd'/>
<id>4b1f21de75f9981007d80aca8355239e8615d6bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>win: integrate winpty (WIP)</title>
<updated>2017-08-16T07:13:43+00:00</updated>
<author>
<name>Ryan Prichard</name>
<email>ryan.prichard@gmail.com</email>
</author>
<published>2016-02-24T08:14:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=7f22a27a10655dc40528f35034cbdf8c9543241c'/>
<id>7f22a27a10655dc40528f35034cbdf8c9543241c</id>
<content type='text'>
Handling of process exit is still broken.  It detects the moment when the
child process exits, then quickly stops polling for process output.  It
should continue polling for output until the agent has scraped all of the
process' output.  This problem is easy to notice by running a command like
"dir &amp;&amp; exit", but even typing "exit&lt;ENTER&gt;" can manifest the problem --
the "t" might not appear.

winpty's Cygwin adapter handles shutdown by waiting for the agent to close
the CONOUT pipe, which it does after it has scraped the child's last
output.  AFAIK, neovim doesn't do anything interesting when winpty closes
the CONOUT pipe.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handling of process exit is still broken.  It detects the moment when the
child process exits, then quickly stops polling for process output.  It
should continue polling for output until the agent has scraped all of the
process' output.  This problem is easy to notice by running a command like
"dir &amp;&amp; exit", but even typing "exit&lt;ENTER&gt;" can manifest the problem --
the "t" might not appear.

winpty's Cygwin adapter handles shutdown by waiting for the agent to close
the CONOUT pipe, which it does after it has scraped the child's last
output.  AFAIK, neovim doesn't do anything interesting when winpty closes
the CONOUT pipe.
</pre>
</div>
</content>
</entry>
<entry>
<title>io: more guards against NULL filename (#7159)</title>
<updated>2017-08-13T16:46:09+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2017-08-13T16:46:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=d258ac8ed21b3a202212792688b237d0741f6844'/>
<id>d258ac8ed21b3a202212792688b237d0741f6844</id>
<content type='text'>
References ac055d677aa9
References #4370</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
References ac055d677aa9
References #4370</pre>
</div>
</content>
</entry>
<entry>
<title>os_stat: return ENOENT on NULL filename arg</title>
<updated>2017-08-09T22:56:07+00:00</updated>
<author>
<name>James McCoy</name>
<email>jamessan@jamessan.com</email>
</author>
<published>2017-08-08T20:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=ac055d677aa9eff9fca11cecb5ac7f7a4edb0265'/>
<id>ac055d677aa9eff9fca11cecb5ac7f7a4edb0265</id>
<content type='text'>
Closes #4370

Explication:

    In the backtrace in #4370, we see that `buf_write()` was called with
    non-NULL `fname` and `sfname` arguments, but they've since _become_
    NULL.

    #7  0x00000000004de09d in buf_write (buf=0x1dee040, fname=0x0, fname@entry=0x1e985b0 "/home/sean/src/github.com/snczl/virta/pkg/meld/segment.go",
                                         sfname=0x0, sfname@entry=0x1ddfa60 "segment.go", start=1, end=72, eap=eap@entry=0x7ffc6b032e60, append=0,
                                         forceit=0, reset_changed=1, filtering=0)
    at /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/fileio.c:2576

    This is most likely due to the code that restores those values from
    `buf`, which happens just before the fatal call to `os_fileinfo`

    ```c
        /*
         * The autocommands may have changed the name of the buffer, which may
         * be kept in fname, ffname and sfname.
         */
        if (buf_ffname)
          ffname = buf-&gt;b_ffname;
        if (buf_sfname)
          sfname = buf-&gt;b_sfname;
        if (buf_fname_f)
          fname = buf-&gt;b_ffname;
        if (buf_fname_s)
          fname = buf-&gt;b_sfname;
    ```

    It's worth noting that at this point `ffname` is still non-NULL, so
    it _could_ be used.  However, our current code is purely more strict
    than Vim in this area, which has caused us problems before (e.g.,
    `getdigits()`).  The commentary for `struct file_buffer` clearly
    indicate that all of `b_ffname`, `b_sfname`, and `b_fname` may be
    NULL:

    ```c
      /*
       * b_ffname has the full path of the file (NULL for no name).
       * b_sfname is the name as the user typed it (or NULL).
       * b_fname is the same as b_sfname, unless ":cd" has been done,
       *		then it is the same as b_ffname (NULL for no name).
       */
      char_u      *b_ffname;        /* full path file name */
      char_u      *b_sfname;        /* short file name */
      char_u      *b_fname;         /* current file name */
    ```

    Vim directly calls `stat(2)` which, although it is annotated to tell
    the compiler that the path argument is non-NULL, does handle a NULL
    pointer by returning a `-1` value and setting `errno` to `EFAULT`.
    This satisfies Vim's check, since it treats any `-1` return from
    `stat(2)` to mean the file doesn't exist (at least in this code
    path).

    Note that Vim's mch_stat() implementations on win32 and solaris
    clearly cannot accept NULL `name`. But the codepaths that call
    mch_stat will NULL `name` tend to be unix-only (eg: u_read_undo)!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #4370

Explication:

    In the backtrace in #4370, we see that `buf_write()` was called with
    non-NULL `fname` and `sfname` arguments, but they've since _become_
    NULL.

    #7  0x00000000004de09d in buf_write (buf=0x1dee040, fname=0x0, fname@entry=0x1e985b0 "/home/sean/src/github.com/snczl/virta/pkg/meld/segment.go",
                                         sfname=0x0, sfname@entry=0x1ddfa60 "segment.go", start=1, end=72, eap=eap@entry=0x7ffc6b032e60, append=0,
                                         forceit=0, reset_changed=1, filtering=0)
    at /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/fileio.c:2576

    This is most likely due to the code that restores those values from
    `buf`, which happens just before the fatal call to `os_fileinfo`

    ```c
        /*
         * The autocommands may have changed the name of the buffer, which may
         * be kept in fname, ffname and sfname.
         */
        if (buf_ffname)
          ffname = buf-&gt;b_ffname;
        if (buf_sfname)
          sfname = buf-&gt;b_sfname;
        if (buf_fname_f)
          fname = buf-&gt;b_ffname;
        if (buf_fname_s)
          fname = buf-&gt;b_sfname;
    ```

    It's worth noting that at this point `ffname` is still non-NULL, so
    it _could_ be used.  However, our current code is purely more strict
    than Vim in this area, which has caused us problems before (e.g.,
    `getdigits()`).  The commentary for `struct file_buffer` clearly
    indicate that all of `b_ffname`, `b_sfname`, and `b_fname` may be
    NULL:

    ```c
      /*
       * b_ffname has the full path of the file (NULL for no name).
       * b_sfname is the name as the user typed it (or NULL).
       * b_fname is the same as b_sfname, unless ":cd" has been done,
       *		then it is the same as b_ffname (NULL for no name).
       */
      char_u      *b_ffname;        /* full path file name */
      char_u      *b_sfname;        /* short file name */
      char_u      *b_fname;         /* current file name */
    ```

    Vim directly calls `stat(2)` which, although it is annotated to tell
    the compiler that the path argument is non-NULL, does handle a NULL
    pointer by returning a `-1` value and setting `errno` to `EFAULT`.
    This satisfies Vim's check, since it treats any `-1` return from
    `stat(2)` to mean the file doesn't exist (at least in this code
    path).

    Note that Vim's mch_stat() implementations on win32 and solaris
    clearly cannot accept NULL `name`. But the codepaths that call
    mch_stat will NULL `name` tend to be unix-only (eg: u_read_undo)!
</pre>
</div>
</content>
</entry>
<entry>
<title>buf_write(): wrong argument to os_fileinfo_hardlinks</title>
<updated>2017-08-09T08:45:17+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2017-08-08T18:50:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=9506ee037083ff047a3601b3d97acf91521a58fb'/>
<id>9506ee037083ff047a3601b3d97acf91521a58fb</id>
<content type='text'>
This was broken in ye olde refactor from 2014:
e85fe0957d40080f43cbfcbe9eb8864475325b09

References #4370
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was broken in ye olde refactor from 2014:
e85fe0957d40080f43cbfcbe9eb8864475325b09

References #4370
</pre>
</div>
</content>
</entry>
</feed>
