> > In general, Emacs can only prevent GTK from handling certain events. > If it handles an event that it must handle (in this case, > XI_HierarchyChange) incorrectly, and that causes GTK to later > dereference NULL, there is nothing that Emacs can do. Just like what > happens when GTK calls _exit under our nose. > I sent a short demo that shows how one can escape from an _exit a few weeks ago in bug#56967; I attach it here again. The same kind of things can be done to circumvent segfaults in library functions.