[PATCH weston 02/16] ivi-shell: rework surface_add_notification API

Pekka Paalanen ppaalanen at gmail.com
Fri Apr 1 10:49:44 UTC 2016


On Thu, 31 Mar 2016 11:08:58 +0000
"Ucan, Emre (ADITG/SW1)" <eucan at de.adit-jv.com> wrote:

> The surface_add_notification API accepts a simple
> wl_listener instead of a ivi-shell specific notification
> function. Therefore, the API is renamed to surface_add_listener.
> 
> This change has several advantages:
> 1. Code cleanup
> 2. No dynamic memory allocation. Listeners are allocated
>    by controller plugins
> 3. Remove API is not needed. Controller plugins can easily
>    remove the listener link.
> 
> Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
> ---
>  ivi-shell/ivi-layout-export.h  |    5 ++--
>  ivi-shell/ivi-layout.c         |   52 +++++-----------------------------------
>  tests/ivi_layout-test-plugin.c |   37 ++++++++++++++++------------
>  3 files changed, 30 insertions(+), 64 deletions(-)

Hi,

this patch causes the following in 'make distcheck':

*** Error in `/home/pq/build/weston/weston-1.10.90/_build/sub/weston': double free or corruption (out): 0x00007fd74d9005d0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7116f)[0x7fd74dd8616f]
/lib64/libc.so.6(+0x765ae)[0x7fd74dd8b5ae]
/lib64/libc.so.6(+0x772e6)[0x7fd74dd8c2e6]
/home/pq/build/weston/weston-1.10.90/_build/sub/.libs/ivi-shell.so(+0x39dd)[0x7fd74d9049dd]
/home/pq/build/weston/weston-1.10.90/_build/sub/.libs/ivi-layout-test.so(+0x2135)[0x7fd74d6fa135]
/home/pq/build/weston/weston-1.10.90/_build/sub/.libs/ivi-layout-test.so(+0x1f43)[0x7fd74d6f9f43]
/usr/lib64/libffi.so.6(ffi_call_unix64+0x4c)[0x7fd74f0cdda4]
/usr/lib64/libffi.so.6(ffi_call+0x1fc)[0x7fd74f0cd6cc]
/home/pq/local/lib/libwayland-server.so.0(+0xafc2)[0x7fd74f2dafc2]
/home/pq/local/lib/libwayland-server.so.0(+0x770e)[0x7fd74f2d770e]
/home/pq/local/lib/libwayland-server.so.0(wl_event_loop_dispatch+0x62)[0x7fd74f2d9432]
/home/pq/local/lib/libwayland-server.so.0(wl_display_run+0x25)[0x7fd74f2d7c05]
/home/pq/build/weston/weston-1.10.90/_build/sub/weston[0x408ce5]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7fd74dd35865]
/home/pq/build/weston/weston-1.10.90/_build/sub/weston(_start+0x29)[0x408e69]
FAIL: ivi-layout-test.la

I think this gets fixed by the following patch, which removes the calls
to ivi_layout_surface_remove_notification().

However, to maintain bisectability, every commit should be buildable
and runnable at least as well as before.

Could you move the change to ivi_layout_surface_destroy() from the
following patch into this patch? I guess that might fix the issue.

Btw. I use the following incantation to run distcheck through a series
of commits:

$ git rebase -i --exec 'cd ~/build/weston && make -j7 install && make -j7 distcheck' origin/master^

If you see a failure in text.weston test, you can likely ignore it. I
see it failing randomly and re-running distcheck almost always succeeds.

I'll send a reply to the cover letter, once I've gone through all the
patches.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160401/36fef065/attachment.sig>


More information about the wayland-devel mailing list