I believe we have a working patch for the problem. A quick summary of
what it looks like is happening:

Openbox maintains a list of windows organized by stacking order from
highest to lowest. This is a doubly-linked list.

There is a function in Openbox called client_calc_layer that uses a
pointer into this list to walk through it while modifying it. When
client_calc_layer modifies the list, it also messes up the pointer that
it is actively using to walk through the list. The next element that
Openbox loads contains a dangling pointer, and that promptly results in
a segfault when Openbox tries to dereference that pointer.

To solve the problem, I added a patch that makes Openbox save a pointer
to the list element *before* the current element before modifying the
list. When the list is then modified, the still-valid pointer to the
previous list element is used to get a new (and actually usable!)
pointer to the current list element. The old, broken pointer is then
overwritten by the new, working pointer, and the segfaults stop.

Using the patch, I am no longer able to reproduce this bug when
following the testcase (open a browser fullscreen, right-click a link,
and click "Open in new window"). I have the patched Openbox uploaded to
a PPA here: https://launchpad.net/~arraybolt3/+archive/ubuntu/openbox

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to glib2.0 in Ubuntu.
https://bugs.launchpad.net/bugs/2011751

Title:
  openbox crashed with SIGABRT

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/2011751/+subscriptions


-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to