diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-03-30 19:11:17 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-04-07 20:04:33 -0400 |
commit | bddba93949b08e97a7617044e2092a98c3951bb5 (patch) | |
tree | 93b8a41f4e107fbf16d96edff8094324ca27bec5 /test/functional/shell/viml_system_spec.lua | |
parent | 31581bd750ccaf11bdd7c5b16981ce111ebfcd74 (diff) | |
download | rneovim-bddba93949b08e97a7617044e2092a98c3951bb5.tar.gz rneovim-bddba93949b08e97a7617044e2092a98c3951bb5.tar.bz2 rneovim-bddba93949b08e97a7617044e2092a98c3951bb5.zip |
Fix warnings: eval.c: f_termopen(): Use-after-free: MI.
Problem : Use-after-free @ 15081.
Diagnostic : Multithreading issue.
Rationale : `get_dict_callback` can return NULL on two different
cases: 1) when the dict doesn't contain the given key;
this case is not considered an error. 2) when the key
exists but there's some problem with its value; this is
considered an error.
Then, code calling `get_dict_callback` in
`common_job_callbacks`, as well as code calling
`common_job_callbacks`, uses `did_emsg` to distinguish
between error/non-error cases.
Suggested error path presumes an error condition within
`common_job_callbacks`, with `did_emsg` being true, but
then being false just after returning to calling code in
`f_termopen`.
That, clearly, could only happen if another thread run in
between those points.
Resolution : Refactor `get_dict_callback` and `common_job_callbacks`, so
that they clearly distinguish between error/non-error
situations, without recurring to globals.
Diffstat (limited to 'test/functional/shell/viml_system_spec.lua')
0 files changed, 0 insertions, 0 deletions