<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - SIGSEGV in weston_wm_window_destroy"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80273#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - SIGSEGV in weston_wm_window_destroy"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80273">bug 80273</a>
from <span class="vcard"><a class="email" href="mailto:ppaalanen@gmail.com" title="Pekka Paalanen <ppaalanen@gmail.com>"> <span class="fn">Pekka Paalanen</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=80273#c1">comment #1</a>)
<span class="quote">> Possible Fixes:
>
> 2. Add NULL pointer checks to wl_list_remove in Wayland's source at
> wayland-util.c:52. This would work, but it sort of acts like a band-aid for
> the real problem, which is in Weston. One could argue that wayland shouldn't
> crash due to the negligence of the display compositor, but the C++ STL is
> like wayland in that it will crash or leak memory if improperly managed.</span >
Yeah, at least this option 2 is invalid. wl_list functions assume that they are
always used right: a double-remove is illegal. Even the set-to-NULL here is
only a debug aid to make sure the program crashes rather than silently corrupts
memory. Also checking for wl_list::next/prev for NULL is invalid if expected to
be set by libwayland.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>