about summary refs log tree commit diff stats
path: root/config
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2021-04-26 21:36:00 +0200
committerReto Brunner <reto@labrat.space>2021-04-28 07:54:16 +0200
commit1687e558d3fae4d5622677c031bb9365a8c3e261 (patch)
tree060488fa9ad74bd201ff61b2c5f88d33e5cb9c34 /config
parent60c5a82a76a639137a15a1446bc71434e432d8cd (diff)
downloadaerc-1687e558d3fae4d5622677c031bb9365a8c3e261.tar.gz
notmuch/maildir: remove double emit of the dirinfo
There was some bug which could be worked around by double emitting an event.
However that proofed to be brittle:

We send the first message here from the worker goroutine:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/maildir/worker.g=
o#L306

Then Tick() is waked in the main goroutine and calls ProcessMessage:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/widgets/account.go#L100

ProcessMessage in the main goroutine reads types.Message state with
msg.getId() and msg.InResponseTo():
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/types/worker.go#=
L74-76

Meanwhile in the worker goroutine we call PostMessage for a second
time with a pointer that points to the *same* previous message that
ProcessMessage is reading:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/maildir/worker.g=
o#L306

The second PostMessage call makes writes to message while
ProcessMessage in the main goroutine is possibly reading:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/types/worker.go#=
L59

This led to a data race in the event loop

Reported-By: Wagner Riffel <w@104d.net>
Diffstat (limited to 'config')
0 files changed, 0 insertions, 0 deletions