h_east <[email protected]> wrote:
> Hi Dominique!
>
> 2015-7-18(Sat) 9:38:45 UTC+9 Dominique Pelle:
>> Bram Moolenaar <[email protected]> wrote:
>>
>> > Patch 7.4.786
>> > Problem: It is not possible for a plugin to adjust to a changed setting.
>> > Solution: Add the OptionSet autocommand event. (Christian Brabandt)
>>
>> Hi
>>
>> This patch causes use of freed memory when running test10.
>>
>> changeset 6935:4db70c94226b -> crash in test 10 with asan
>> changeset 6934:be7bd53ad376 -> no crash
....snip...
> Could you try attached patch?
>
> --
> Best regards,
> Hirohito Higashi (a.k.a h_east)
Hi Hirohito
test10 still crashes after your patch, but the stack is then
different after your patch:
=================================================================
==5222==ERROR: AddressSanitizer: heap-use-after-free on address
0x6020000154d0 at pc 0x0000004da587 bp 0x7ffcb39f31d0 sp
0x7ffcb39f2988
READ of size 2 at 0x6020000154d0 thread T0
#0 0x4da586 in strlen ??:?
#1 0xc94c39 in vim_strsave /home/pel/sb/vim/src/misc2.c:1245
#2 0x672be9 in set_vim_var_string /home/pel/sb/vim/src/eval.c:20566
#3 0xea7933 in set_string_option /home/pel/sb/vim/src/option.c:5743
#4 0xe543f0 in set_option_value /home/pel/sb/vim/src/option.c:9264
#5 0xf3911e in ex_copen /home/pel/sb/vim/src/quickfix.c:2440
#6 0x88e0d0 in do_one_cmd /home/pel/sb/vim/src/ex_docmd.c:2940
#7 0x877452 in do_cmdline /home/pel/sb/vim/src/ex_docmd.c:1133
#8 0xd96e94 in nv_colon /home/pel/sb/vim/src/normal.c:5405
#9 0xd4c127 in normal_cmd /home/pel/sb/vim/src/normal.c:1162
#10 0x15ab12d in main_loop /home/pel/sb/vim/src/main.c:1351
#11 0x1598cca in main /home/pel/sb/vim/src/main.c:1050
#12 0x2b719b3b3ec4 in __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:287
#13 0x465d46 in _start ??:?
0x6020000154d0 is located 0 bytes inside of 7-byte region
[0x6020000154d0,0x6020000154d7)
freed by thread T0 here:
#0 0x4eca32 in free ??:?
#1 0xc94a66 in vim_free /home/pel/sb/vim/src/misc2.c:1707
#2 0xe5e9e9 in free_string_option /home/pel/sb/vim/src/option.c:5488
#3 0xe9c4a7 in did_set_string_option /home/pel/sb/vim/src/option.c:7204
#4 0xea76d2 in set_string_option /home/pel/sb/vim/src/option.c:5731
#5 0xe543f0 in set_option_value /home/pel/sb/vim/src/option.c:9264
#6 0xf3911e in ex_copen /home/pel/sb/vim/src/quickfix.c:2440
#7 0x88e0d0 in do_one_cmd /home/pel/sb/vim/src/ex_docmd.c:2940
#8 0x877452 in do_cmdline /home/pel/sb/vim/src/ex_docmd.c:1133
#9 0xd96e94 in nv_colon /home/pel/sb/vim/src/normal.c:5405
#10 0xd4c127 in normal_cmd /home/pel/sb/vim/src/normal.c:1162
#11 0x15ab12d in main_loop /home/pel/sb/vim/src/main.c:1351
#12 0x1598cca in main /home/pel/sb/vim/src/main.c:1050
#13 0x2b719b3b3ec4 in __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:287
previously allocated by thread T0 here:
#0 0x4ecd12 in __interceptor_malloc ??:?
#1 0xc928c2 in lalloc /home/pel/sb/vim/src/misc2.c:921
#2 0xc9252b in alloc /home/pel/sb/vim/src/misc2.c:820
#3 0xc94c9c in vim_strsave /home/pel/sb/vim/src/misc2.c:1246
#4 0xeb1906 in copy_winopt /home/pel/sb/vim/src/option.c:10466
#5 0x52634f in get_winopts /home/pel/sb/vim/src/buffer.c:2708
#6 0x7f77b0 in do_ecmd /home/pel/sb/vim/src/ex_cmds.c:3522
#7 0xf38ed5 in ex_copen /home/pel/sb/vim/src/quickfix.c:2429
#8 0x88e0d0 in do_one_cmd /home/pel/sb/vim/src/ex_docmd.c:2940
#9 0x877452 in do_cmdline /home/pel/sb/vim/src/ex_docmd.c:1133
#10 0xd96e94 in nv_colon /home/pel/sb/vim/src/normal.c:5405
#11 0xd4c127 in normal_cmd /home/pel/sb/vim/src/normal.c:1162
#12 0x15ab12d in main_loop /home/pel/sb/vim/src/main.c:1351
#13 0x1598cca in main /home/pel/sb/vim/src/main.c:1050
#14 0x2b719b3b3ec4 in __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:287
Regards
Dominique
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.