-
Notifications
You must be signed in to change notification settings - Fork 13k
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
std::rl is unsafe #3921
Comments
Also, the completion callbacks need to be cleaned up at some point. This API should probably be attached to some ReadlineContext that tries to pretend like it's not a global API, cleans up the Rust pointers on destruction, and tries to be defensive about multiple clients trying to use the API concurrently. |
blocked on #553 most likely |
Triage: hopefully fixed when #9096 lands. |
bors
added a commit
that referenced
this issue
Sep 12, 2013
- Wrap calls into linenoise in a mutex so that the functions don't have to be `unsafe` any more (fixes #3921) - Stop leaking every line that linenoise reads. - Handle the situation of `rl::complete(some_function); do spawn { rl::read(""); }` which would crash (`fail!` that turned into an abort, possibly due to failing with the lock locked) when the user attempted to tab-complete anything. - Add a test for the various functions; it has to be run by hand to verify anything works, but it won't bitrot.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
linenoise uses global state without mutexes. My preferred fix is #3915. For now I will mark the interface unsafe.
The text was updated successfully, but these errors were encountered: