-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid reads in regexp handling code #3150
Comments
This has something to do with screen because I can replace
|
(Though you can guess this from function names: it is not just “something to do with screen”, but “something to do with &hlsearch support”.) |
One can use
|
And I do not see these errors in vim-7.4.788 (with my patches: bookmark local-default in https://bitbucket.org/ZyX_I/vim), so maybe just porting some patches from Vim is enough to fix the issue. |
And, by the way, Vim reports E486: Pattern not found, while NeoVim highlights |
No. |
At least, this does not trigger the error in Vim. And NeoVim still does not show E486 while it should. |
And I still see this error reported when I prepend |
Possibly related: junegunn/fzf#207 (comment) |
@ZyX-I Is
enough to reproduce the bug consistently? I've tried a few times but got no errors(a94a681) |
@tarruda This command errors out with
on a94a681. Using “Linux zyx-desktop 4.0.5-gentoo #1 SMP Mon Jul 20 20:43:27 MSK 2015 x86_64 AMD FX(tm)-6200 Six-Core Processor AuthenticAMD GNU/Linux”. Not using jemalloc. |
@tarruda Can jemalloc change the outcome? |
It appears so, after disabling jemalloc I saw the errors. AFAIK jemalloc allocates memory from pools of different sizes, which explains why the invalid read is not detected by valgrind. I think it is reasonable to disable JEMALLOC by default on debug builds. |
This week there was a vim_dev patch regarding syntax engine instability with Bram's response:
Neovim already does this. Correct? |
Yes, and the main reason is the one described by Bram:
|
For the record, the problem described in the issue is not the same as the one described in that vim_dev thread |
FWIW this bug seems present on vim 7.4.52(the ubuntu 14.04 version) |
When checking ShaDa code from #2506 I found what I think are not a ShaDa bugs:
In the following test:
valgrind reports:
. This happens in the third run process, meaning that one of the following lines are responsible:
The following log:
for
. Also in the third process, so responsible should be
What should happen in those tests:
nvim_eval('setline(".", ["«\171"])')
in both cases sets current line to"\xC2\xAB\xAB"
.nvim_command('~&')
in first test runs something likesubstitute/«//
, as well asnvim_command('&')
from the second (but in the second case there is a dot in replacement).I was able to reproduce this with the following input:
Note: problem is not triggered when
--cmd cquit
to quit.-c cquit
to quit.Quiting with
-s <(echo :cquit)
is done for this reason.The text was updated successfully, but these errors were encountered: