diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-07-28 19:39:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-28 19:39:03 +0200 |
commit | 6953e151bbcbc1405762d94790957a0446300c9f (patch) | |
tree | e99060e91d530f5318c83c9d2f0567cc3eb7e05e /scripts/gen_help_html.py | |
parent | cfa2759df61b45458666cd965bbfa3083a9ccd21 (diff) | |
download | rneovim-6953e151bbcbc1405762d94790957a0446300c9f.tar.gz rneovim-6953e151bbcbc1405762d94790957a0446300c9f.tar.bz2 rneovim-6953e151bbcbc1405762d94790957a0446300c9f.zip |
context: shada_encode_regs(): init WriteMergerState #10637
- Check shada_pack_xx() result, abort on failure.
- Use xcalloc() to zero-initialize `wms`, fixes below ASAN failure.
ASAN failure (running vim_spec.lua in a loop):
../src/nvim/shada.c:1773:13: runtime error: load of value 224, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/nvim/shada.c:1773:13
Adding an explicit check just before the ASAN failed line:
case kSDItemRegister: {
if (*((int *)(void *)&entry.data.reg.is_unnamed) != 1
&& *((int *)(void *)&entry.data.reg.is_unnamed) != 0) {
abort();
(gdb) p entry.data.reg
+p entry.data.reg
$5 = {name = 49 '1', type = kMTLineWise, contents = 0x60200000c250, is_unnamed = true, contents_size = 1, width = 0, additional_data = 0x0}
(gdb) p *((uint8_t *)(void *)&entry.data.reg.is_unnamed)
+p *((uint8_t *)(void *)&entry.data.reg.is_unnamed)
$7 = 2049
Diffstat (limited to 'scripts/gen_help_html.py')
0 files changed, 0 insertions, 0 deletions