Skip to content
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

data race in history search #219

Open
slingamn opened this issue Feb 12, 2023 · 0 comments
Open

data race in history search #219

slingamn opened this issue Feb 12, 2023 · 0 comments

Comments

@slingamn
Copy link

With the test case in #217 against v1.5.1 / 7f93d88 (after entering some commands and mashing Ctrl-R a couple times):

> ==================
WARNING: DATA RACE
Write at 0x00c00013e080 by goroutine 13:
  github.com/chzyer/readline.(*opSearch).SearchMode()
      github.com/chzyer/readline/search.go:104 +0x66
  github.com/chzyer/readline.(*Operation).ioloop()
      github.com/chzyer/readline/operation.go:188 +0x1cfd
  github.com/chzyer/readline.NewOperation.func2()
      github.com/chzyer/readline/operation.go:88 +0x39

Previous read at 0x00c00013e080 by main goroutine:
  github.com/chzyer/readline.(*opSearch).IsSearchMode()
      github.com/chzyer/readline/search.go:50 +0x199
  github.com/chzyer/readline.(*wrapWriter).Write()
      github.com/chzyer/readline/operation.go:60 +0x158
  github.com/chzyer/readline.(*Instance).Write()
      github.com/chzyer/readline/readline.go:298 +0xeb
  fmt.Fprintf()
      fmt/print.go:225 +0xb1
  main.main()
      minimal.go:57 +0x513

Goroutine 13 (running) created at:
  github.com/chzyer/readline.NewOperation()
      github.com/chzyer/readline/operation.go:88 +0x904
  github.com/chzyer/readline.(*Terminal).Readline()
      github.com/chzyer/readline/terminal.go:95 +0x5b
  github.com/chzyer/readline.NewEx()
      github.com/chzyer/readline/readline.go:169 +0x41
  github.com/chzyer/readline.New()
      github.com/chzyer/readline/readline.go:181 +0x10e
  main.main()
      minimal.go:16 +0x56
==================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant