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 warning #214

Open
avlapp opened this issue Nov 1, 2022 · 0 comments
Open

data race warning #214

avlapp opened this issue Nov 1, 2022 · 0 comments

Comments

@avlapp
Copy link

avlapp commented Nov 1, 2022

WARNING: DATA RACE
Write at 0x00c0000ce1f0 by goroutine 35:
github.com/chzyer/readline.(*opSearch).OnWidthChange()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/search.go:46 +0xc9
github.com/chzyer/readline.NewOperation.func1()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/operation.go:85 +0x9d
github.com/chzyer/readline.DefaultOnWidthChanged.func1.1()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/utils_unix.go:79 +0x41

Previous write at 0x00c0000ce1f0 by goroutine 132:
github.com/chzyer/readline.newOpSearch()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/search.go:36 +0x3f7
github.com/chzyer/readline.(*Operation).SetConfig()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/operation.go:477 +0x34c
github.com/chzyer/readline.NewOperation()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/operation.go:78 +0x315
github.com/chzyer/readline.(*Terminal).Readline()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/terminal.go:95 +0x5b
github.com/chzyer/readline.NewEx()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/readline.go:169 +0x41
github.com/chzyer/readline.New()
/home/archie/go/pkg/mod/github.com/chzyer/[email protected]/readline.go:181 +0xee
jasmgo/app.handleReadLine()

slingamn added a commit to slingamn/readline that referenced this issue Feb 13, 2023
Fixes chzyer#214

Even under a further-reaching concurrency redesign, it makes sense to use
sync/atomic for these because they are modified from signal handlers.
slingamn added a commit to slingamn/readline that referenced this issue Mar 5, 2023
Fixes chzyer#214

Even under a further-reaching concurrency redesign, it makes sense to use
sync/atomic for these because they are modified from signal handlers.
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