You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the test case from #217 (calling (*Instance).Write() concurrently with (*Instance).Readline()), with v1.5.1 on go 1.20, there is a race condition (although not a data race) where the prompt is not always redrawn correctly. Example output:
> a
received a
> b
> received b
> c
received c
> d
> received d
> e
received e
> f
received f
> g
received g
>
received
>
received
>
received
>
received
>
> received
>
received
>
received
>
> received
The lines where > is followed by text are failures to redraw the prompt.
Using the test case from #217 (calling
(*Instance).Write()
concurrently with(*Instance).Readline()
), with v1.5.1 on go 1.20, there is a race condition (although not a data race) where the prompt is not always redrawn correctly. Example output:The lines where
>
is followed by text are failures to redraw the prompt.This appears to be caused by a TOCTOU race here:
readline/operation.go
Lines 48 to 50 in 7f93d88
Removing this fast path fixes the issue, but I'm wondering if it might have negative performance implications?
The text was updated successfully, but these errors were encountered: