Skip to content

gtk: allocate Gtk memory with 'atomic-interior - #375

Open
samth wants to merge 1 commit into
racket:masterfrom
samth:gtk-atomic-interior
Open

samth wants to merge 1 commit into
racket:masterfrom
samth:gtk-atomic-interior

Conversation

@samth

@samth samth commented Oct 19, 2026

Copy link
Copy Markdown
Member

It's possible to call back into Racket during a Gtk call, via logging, signal handling, and other operations. If the Racket code triggers a collection, Gtk structs could move in the heap, leading to a crash. Avoid that by using 'atomic-interior mode with all the data that Gtk can reach.

It's possible to call back into Racket during a Gtk call, via logging,
signal handling, and other operations. If the Racket code triggers a
collection, Gtk structs could move in the heap, leading to a crash.
Avoid that by using `'atomic-interior` mode with all the data that Gtk
can reach.
@samth

samth commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

This won't pass on CI until tomorrow, because it needs the FFI type added in racket/racket#5617.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant