Skip to content

RevealLabel: Replace cross-thread mutex usge with state flag #471

Description

@emulti

As in PR #470 -

After porting Tuner to OpenBSD, the application would intermittently
abort in g_mutex_unlock().

GDB showed that RevealLabel.set_text() could acquire
_set_text_lock from a worker thread, while the corresponding unlock
occurred later from a GLib timeout callback running on the GTK main
thread.

Unlocking a mutex from a thread other than the owner is undefined
behaviour and triggers SIGABRT on OpenBSD.

The mutex was being used as a state flag to prevent overlapping text
animations rather than to protect shared data, so this patch replaces
it with a simple boolean flag.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions