Skip to content

spinner: add workaround for memory corruption issue

Michael Catanzaro requested to merge mcatanzaro/adw-spinner-crash into main

This is a workaround for glib#3434 (closed) which is a duplicate of glib#1002.

The problem is GObject atomically destroys its list of weak notifies when an object is disposed, then iterates through each notify. If one notify tries to remove a later notify, it will fail and emit a critical. Then the later notify will be improperly executed, leading to use after free.

There is a solution in glib!3864, which changes GObject to remove weak notifies just one at a time. But that is going to take a while to land, and it's a longstanding bug. We should land a workaround now so that applications can safely use AdwSpinner in the meantime.

Merge request reports