summary refs log tree commit diff stats
path: root/widgets/exline.go
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-04-27 15:09:59 +0000
committerDrew DeVault <sir@cmpwn.com>2019-04-27 11:42:12 -0400
commit2159eb876e7e04e81f65e64b1d742ad832890289 (patch)
tree672eabb782e3a0647a6607cd0c973834021747fc /widgets/exline.go
parente72574c308c04cb30af95f5c88983e0cab798fea (diff)
downloadaerc-2159eb876e7e04e81f65e64b1d742ad832890289.tar.gz
widgets/spinner: fix Spinner.frame race
It's accessed by the goroutine which increments it and the goroutine that draws
the widget at the same time. Use atomic instead.

    Write at 0x00c00000ebc0 by goroutine 7:
      git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1()
          /home/simon/src/aerc2/widgets/spinner.go:50 +0x169

    Previous read at 0x00c00000ebc0 by main goroutine:
      [failed to restore the stack]

    Goroutine 7 (running) created at:
      git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start()
          /home/simon/src/aerc2/widgets/spinner.go:44 +0x8b
      git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList()
          /home/simon/src/aerc2/widgets/dirlist.go:37 +0x286
      git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView()
          /home/simon/src/aerc2/widgets/account.go:50 +0x5ca
      git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc()
          /home/simon/src/aerc2/widgets/aerc.go:60 +0x800
      main.main()
          /home/simon/src/aerc2/aerc.go:65 +0x33e
Diffstat (limited to 'widgets/exline.go')
0 files changed, 0 insertions, 0 deletions