• Derek Foreman's avatar
    tests: Test for use after free in resource destruction signals · 58ee271b
    Derek Foreman authored
    For years it's been common practice to free the object containing
    the wl_listener inside resource destruction notifiers, but not
    remove the listener from the list.
    
    That is: It's been safe to assume (when only one listener is present)
    that the wl_listener will never be touched again, since this is
    a destruction callback.
    
    Recently some patches were reviewed that made some positive changes
    to our internal signal handling code, but would've violated this
    assumption, and changed free()d memory in several existing compositors
    (weston, mutter, enlightenment).
    
    Since the breakage was extremely subtle, codify this assumption in
    a test case (thus promoting it to an ABI promise).
    Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: Ongy's avatarMarkus Ongyerth <wl@ongy.net>
    Signed-off-by: 's avatarDerek Foreman <derekf@osg.samsung.com>
    58ee271b
Name
Last commit
Last update
cursor Loading commit data...
doc Loading commit data...
egl Loading commit data...
m4 Loading commit data...
protocol Loading commit data...
spec Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
COPYING Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
publish-doc Loading commit data...
wayland-scanner.m4 Loading commit data...
wayland-scanner.mk Loading commit data...