<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/msgpack_rpc, branch v0.3.0</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>API: validation: mention invalid method name (#8489)</title>
<updated>2018-06-07T08:56:44+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-06-07T08:56:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=3abf17ae88e3048c20b1645b9d78b69566e89872'/>
<id>3abf17ae88e3048c20b1645b9d78b69566e89872</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>api: list information about all channels/jobs.</title>
<updated>2018-05-23T16:18:16+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2017-05-14T05:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=6da4548f0e7ccaf2b3271c0b0d59b5c8869792a7'/>
<id>6da4548f0e7ccaf2b3271c0b0d59b5c8869792a7</id>
<content type='text'>
Fire autocmd when channel opens or its info changes.
Add a way for API clients can describe themselves.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fire autocmd when channel opens or its info changes.
Add a way for API clients can describe themselves.
</pre>
</div>
</content>
</entry>
<entry>
<title>server: init v:servername if $NVIM_LISTEN_ADDRESS is invalid</title>
<updated>2018-04-11T00:41:05+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-04-10T22:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=704ba4151e7f67999510ee0ac19fdabb595d530c'/>
<id>704ba4151e7f67999510ee0ac19fdabb595d530c</id>
<content type='text'>
Before this change, if $NVIM_LISTEN_ADDRESS was invalid, v:servername
was left empty.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this change, if $NVIM_LISTEN_ADDRESS was invalid, v:servername
was left empty.
</pre>
</div>
</content>
</entry>
<entry>
<title>server: introduce --listen, deprecate $NVIM_LISTEN_ADDRESS</title>
<updated>2018-04-11T00:41:05+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-04-08T15:20:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=507bda1c95cdac2886f64e59aa6bbf85c3fac389'/>
<id>507bda1c95cdac2886f64e59aa6bbf85c3fac389</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>serverstop(): return FALSE for invalid address</title>
<updated>2018-04-10T23:58:41+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-04-08T11:06:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=9f598e57656fe072114b9f1e73d3051423e13234'/>
<id>9f598e57656fe072114b9f1e73d3051423e13234</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>channels: generalize jobclose()</title>
<updated>2017-11-25T08:37:00+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2017-06-08T15:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=90e5cc5484ceeb410ae2a2706e09ed475cade4a5'/>
<id>90e5cc5484ceeb410ae2a2706e09ed475cade4a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>channels: allow bytes sockets and stdio, and buffered bytes output</title>
<updated>2017-11-24T13:54:15+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2017-06-05T06:29:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=1ebc96fe10fbdbec22caa26d5d52a9f095da9687'/>
<id>1ebc96fe10fbdbec22caa26d5d52a9f095da9687</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>channels: refactor</title>
<updated>2017-11-24T13:50:00+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2017-08-27T09:59:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=5215e3205a07b85e4e4cf1f8a8ca6be2b9556459'/>
<id>5215e3205a07b85e4e4cf1f8a8ca6be2b9556459</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert channel logging, rebased on new code below</title>
<updated>2017-11-24T13:04:56+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2017-07-23T16:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=3717e2157f2d45ce23dbe4ac03085fea2d956dc4'/>
<id>3717e2157f2d45ce23dbe4ac03085fea2d956dc4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>server.c: Fix bug in release mode (#7594)</title>
<updated>2017-11-20T00:55:28+00:00</updated>
<author>
<name>Phlosioneer</name>
<email>mattmdrr2@gmail.com</email>
</author>
<published>2017-11-20T00:55:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=df107149913f82e8b3b6b2060d6dbed3d90e68fe'/>
<id>df107149913f82e8b3b6b2060d6dbed3d90e68fe</id>
<content type='text'>
When compiling with CMAKE_BUILD_TYPE=RelWithDebInfo, several
-Wmaybe-uninitialized warnings are printed. These were thought to
be false positives (#5061); there are no control paths that lead
to an uninitialized value. However, when gcc is run in -O2 mode,
it makes a mistake while generating the necessary logic.

Specifically, for the code:
...
  int = 0; // Index of the server whose address equals addr.
  for (; i &lt; watchers.ga_len; i++) {
    watcher = ((SocketWatcher **)watchers.ga_data)[i];
    // &lt;snip&gt;
  }
  if (i &gt;= watchers.ga_len) {
    ELOG("Not listening on %s", addr);
    return;
  }
...

Gcc generates:
...
&lt;+98&gt;:  cmp  %ebx, %ebp
&lt;+100&gt;: jg   0x530f13   &lt;server_stop+55&gt;
&lt;+102&gt;: cmp  %ebp, ebx
&lt;+104&gt;: jl   0x530f7e   &lt;server_stop+162&gt;
...

Normally, the if statement should catch the only control path
where watcher is not assigned: watchers.ga_len &lt;= 0. When
compiled, the assembly lines 98 and 100 correspond to checking if
i &lt; watchers.ga_len, and the lines 102 and 104 correspond to
checking if i &gt;= watchers.ga_len. The assembly seems to compare
ebp (which is watchers.ga_len) with ebx (which is i), and jump
if greater; then do the same comparison and jump if less. This is
where gcc makes a mistake: it flips the order of the cmp
instruction. This means that the REAL behavior is first check if
i &lt; watchers.ga_len and then check if i &lt; watchers.ga_len. Which
means the code inside the if statement is NEVER executed; no
combination of i and watchers.ga_len will ever trigger ELOG().

So not only is this a use of an uninitialized value if
watchers.ga_len == 0 (or technically, if it's less than zero too),
it also clobbers any error detection if the for loop reaches the
last entry (which would normally cause i == watchers.ga_len too).

This commit fixes this issue by adding a bool to keep track of
whether a watcher was found during the loop. This makes gcc
generate the correct code, avoiding both bugs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When compiling with CMAKE_BUILD_TYPE=RelWithDebInfo, several
-Wmaybe-uninitialized warnings are printed. These were thought to
be false positives (#5061); there are no control paths that lead
to an uninitialized value. However, when gcc is run in -O2 mode,
it makes a mistake while generating the necessary logic.

Specifically, for the code:
...
  int = 0; // Index of the server whose address equals addr.
  for (; i &lt; watchers.ga_len; i++) {
    watcher = ((SocketWatcher **)watchers.ga_data)[i];
    // &lt;snip&gt;
  }
  if (i &gt;= watchers.ga_len) {
    ELOG("Not listening on %s", addr);
    return;
  }
...

Gcc generates:
...
&lt;+98&gt;:  cmp  %ebx, %ebp
&lt;+100&gt;: jg   0x530f13   &lt;server_stop+55&gt;
&lt;+102&gt;: cmp  %ebp, ebx
&lt;+104&gt;: jl   0x530f7e   &lt;server_stop+162&gt;
...

Normally, the if statement should catch the only control path
where watcher is not assigned: watchers.ga_len &lt;= 0. When
compiled, the assembly lines 98 and 100 correspond to checking if
i &lt; watchers.ga_len, and the lines 102 and 104 correspond to
checking if i &gt;= watchers.ga_len. The assembly seems to compare
ebp (which is watchers.ga_len) with ebx (which is i), and jump
if greater; then do the same comparison and jump if less. This is
where gcc makes a mistake: it flips the order of the cmp
instruction. This means that the REAL behavior is first check if
i &lt; watchers.ga_len and then check if i &lt; watchers.ga_len. Which
means the code inside the if statement is NEVER executed; no
combination of i and watchers.ga_len will ever trigger ELOG().

So not only is this a use of an uninitialized value if
watchers.ga_len == 0 (or technically, if it's less than zero too),
it also clobbers any error detection if the for loop reaches the
last entry (which would normally cause i == watchers.ga_len too).

This commit fixes this issue by adding a bool to keep track of
whether a watcher was found during the loop. This makes gcc
generate the correct code, avoiding both bugs.</pre>
</div>
</content>
</entry>
</feed>
