Comments (5)
Woohoo! Thanks @bryphe! I'll pick up the latest and get this into my project.
from libvim.
I am debugging into vim_regcomp
to see if I can track down the issue
from libvim.
vim_regcomp's signature is regprog_T * vim_regcomp(char_u *expr_arg, int re_flags)
and adding printf("expr_arg: %s\n", expr_arg);
as the first line of the function causes the stack trace to start from printf
. Since the error says heap-use-after-free
and the test does vimKey("<esc>")
, I believe what might be happening it is using the same char pointer for the search pattern, but it was freed due to pressing esc.
from libvim.
I worked around this by keeping track of whether search is active or not before calling vimSearchGetHighlights
. I am pretty sure the issue is using the pointer to the search pattern after it was freed. But fixing this seems difficult. vim copies this pointer to several places and keeping track of it is not easy.
I think vimSearchGetHighlights
and vimSearchGetPattern
are both potentially unsafe due to this.
from libvim.
Awesome @city41 ! Let me know if you find any more issues - thanks again for the great repro 👍
from libvim.
Related Issues (12)
- test
- [Feature] Expose command state HOT 1
- Cosmic Cuttlefish (18.10) is no longer supported which is causing CI build failures HOT 1
- Passing commands one character at a time breaks keybinds HOT 1
- vim #defines leak out to rest of app HOT 2
- step backwards from neovim? HOT 1
- WebAssembly build HOT 4
- Conan package support HOT 1
- Manually build headers error: Vim only works with 32 bit int or larger HOT 1
- Support for spellsuggest HOT 2
- libvim for macOS input fields
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libvim.