You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
finalizer functions in Julia can interrupt any other code, including other finalizers, which means that any access to shared state must be guarded by some kind of synchronization strategy.
Currently, the finalizers for various GObjects access several bits of shared state without any synchronization and this permits race-conditions, unless there is something quite clever going on that I didn't see.
Here's an unsafe finalizer, delref from gtype.jl (not the only one). Note that it accesses several globals without using atomic operations or locks:
The segfault reported in #684 is possibly related.
I found this bug because I was reviewing the advice given in the manual for writing safe finalizers.
You can find a discussion of various strategies in that PR: JuliaLang/julia#51191
The text was updated successfully, but these errors were encountered:
could you please also file an issue at https://github.com/JuliaGtk/Gtk4.jl if that is an issue there as well. Gtk.jl is not maintained anymore. Future development happens within Gtk4.jl
Hello,
finalizer
functions in Julia can interrupt any other code, including other finalizers, which means that any access to shared state must be guarded by some kind of synchronization strategy.Currently, the finalizers for various GObjects access several bits of shared state without any synchronization and this permits race-conditions, unless there is something quite clever going on that I didn't see.
Here's an unsafe finalizer,
delref
fromgtype.jl
(not the only one). Note that it accesses several globals without using atomic operations or locks:https://github.com/JuliaGraphics/Gtk.jl/blob/881fdce8eb5a8bce2f1a846f79ac7142177e5b2a/src/GLib/gtype.jl#L405C1-L422
The segfault reported in #684 is possibly related.
I found this bug because I was reviewing the advice given in the manual for writing safe finalizers.
You can find a discussion of various strategies in that PR: JuliaLang/julia#51191
The text was updated successfully, but these errors were encountered: