Bug 91885

Summary: Weston (1.8.92) segfaults at startup on Raspberry Pi in `rpi_flippipe_init()`
Product: Wayland Reporter: John Sadler <deathofathousandpapercuts>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: medium    
Version: unspecified   
Hardware: ARM   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to fix segfault in RPi backend at startup

Description John Sadler 2015-09-04 19:55:36 UTC
Created attachment 118087 [details]
Patch to fix segfault in RPi backend at startup

When running with the RPi backend, Weston now segfaults at startup on the
line:

    flippipe->clk_id = output->base.compositor->presentation_clock;

in `rpi_flippipe_init()`.

This is because `output->base.compositor` is NULL. This problem did not exist on 1.8.0, and it looks like it may have been introduced by 954f183e2f.

I'm attaching a small patch that ensures that the `compositor` is initialised in `rpi_backend` and the output base, prior to the above function being called.

Please consider this patch for inclusion on master as it's currently impossible to run Weston on RPi with this defect.
Comment 1 Pekka Paalanen 2015-09-05 08:42:23 UTC
Bug reports are nice, but please send patches to the mailing list, so we can review and track them at http://patchwork.freedesktop.org/project/wayland/list/ .

Thanks
Comment 2 John Sadler 2015-09-05 14:05:36 UTC
(In reply to Pekka Paalanen from comment #1)
> Bug reports are nice, but please send patches to the mailing list, so we can
> review and track them at
> http://patchwork.freedesktop.org/project/wayland/list/ .
> 
> Thanks

OK, done: http://patchwork.freedesktop.org/patch/58749/

Thanks,

John
Comment 3 Pekka Paalanen 2015-09-10 07:53:31 UTC
Fixed in master:

commit ca510d06dca3e47e434a50cee105e96c9e82599c
Author: John Sadler <deathofathousandpapercuts@gmail.com>
Date:   Sat Sep 5 15:01:38 2015 +0100

    rpi: fix segfault at startup in rpi_flippipe_init() v2

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.