* Functional tests fail with SIGPIPE: disable them until we
figure out the exact problem.
* MSan reports some warnings: allow failures for the Travis
build to allow fixing them in individual follow-up PRs.
Presumably due to tarruda's unifdefing, it was already a no-op at the
time of nvim's first commit.
It's probably better to be clear that it doesn't exist, as opposed to
users thinking `:set guipty` is doing something when it isn't.
Extract the RBuffer class from rstream.c and reimplement it as a ring buffer,
a more efficient version that doesn't need to relocate memory.
The old rbuffer_read/rbuffer_write interfaces are kept for simple
reading/writing, and the RBUFFER_UNTIL_{FULL,EMPTY} macros are introduced to
hide wrapping logic when more control is required(such as passing the buffer
pointer to a library function that writes directly to the pointer)
Also add a basic infrastructure for writing helper C files that are only
compiled in the unit test library, and use this to write unit tests for RBuffer
which contains some macros that can't be accessed directly by luajit.
Helped-by: oni-link <knil.ino@gmail.com>
Reviewed-by: oni-link <knil.ino@gmail.com>
Reviewed-by: Scott Prager <splinterofchaos@gmail.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
- Add `kl_shift_at` macro and backing function. This can be used to shift
elements at arbitrary positions. `kl_shift` is now defined on top of the new
macro.
- Change shift/push API, now `kl_push` accepts an object as parameter and
`kl_shift` returns the object instead of a status. An assertion against
shifting at the end of a list(or empty lists) was added.
- Add `kl_iter` and `kl_iter_at` macros. `kl_iter_at` is for starting the
iteration at arbitrary positions.
This event loop is just a stub instance used in synchronous libuv function
calls, it needs to be decoupled from the main event loop in order to run it from
another thread.
Arguments passed to xmemdupz() are sometimes NULL, but xmemdupz() has
FUNC_ATTR_NONNULL_ALL. Check pointers for NULL before calling
xmemdupz().
Resolves#2533.
Problem : Argument with 'nonnull' attribute passed null @ 203.
Diagnostic : False positive.
Rationale : Problem is supposed to appear when argv[0] is NULL within
do_os_system. But argv is being generated by
shell_build_argv(), which implies argv[0] is the current
value for 'shell' option. Now, option has a non-null
default ($SHELL or "sh"), and, if set by the user, it can
be empty, but not NULL. So, argv[0] can never be NULL.
Resolution : Assert shell_build_argv() postcondition.
a) It's not an error
b) It requires manual redirection of stderr into stdout ('2>&1') in
order to be viewed with a pager, which it warrants given how long the
help message is.
Helped-by: Florian Walch <florian@fwalch.com>