Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Comments

rootston: fix segfault in view_at#1341

Merged
ddevault merged 2 commits intoswaywm:masterfrom
emersion:view-at-unmapped
Nov 1, 2018
Merged

rootston: fix segfault in view_at#1341
ddevault merged 2 commits intoswaywm:masterfrom
emersion:view-at-unmapped

Conversation

@emersion
Copy link
Member

Make sure the view is mapped.

@dos1: can you try this patch?

Fixes #1333

@dos1
Copy link
Contributor

dos1 commented Oct 28, 2018

Thanks! SDL2 still doesn't really work, but rootston doesn't segfault anymore, so I guess #1333 is fixed. I'll open a new ticket ;)

@emersion
Copy link
Member Author

Tried with 0AD which also makes rootston crash, and it fixes the issue.

@dos1
Copy link
Contributor

dos1 commented Oct 28, 2018

Oh, I spoke too early - it just segfaulted. Let me recheck.

@dos1
Copy link
Contributor

dos1 commented Oct 28, 2018

Thread 1 "rootston" received signal SIGSEGV, Segmentation fault.
0x000055555589d590 in ?? ()
(gdb) bt
#0  0x000055555589d590 in  ()
#1  0x000055555555ed99 in view_move (view=view@entry=0x55555589d490, x=<optimized out>, y=<optimized out>) at ../rootston/desktop.c:141
#2  0x0000555555563441 in render_output (output=0x5555557d5450) at ../rootston/output.c:460
#3  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=0x5555557cb620, data=0x5555557cb5c0) at ../util/signal.c:29
#4  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=signal@entry=0x5555557ca150, data=data@entry=0x5555557ca030) at ../util/signal.c:29
#5  0x00007ffff7f8f467 in wlr_output_send_frame (output=output@entry=0x5555557ca030) at ../types/wlr_output.c:542
#6  0x00007ffff7f9d39a in signal_frame (data=0x5555557ca030) at ../backend/x11/output.c:13
#7  0x00007ffff7f3001a in  () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#8  0x00007ffff7f30702 in wl_event_loop_dispatch () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#9  0x00007ffff7f2f2ac in wl_display_run () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#10 0x000055555555a24a in main (argc=<optimized out>, argv=0x7fffffffd9d8) at ../rootston/main.c:74
(gdb) 

@dos1
Copy link
Contributor

dos1 commented Oct 28, 2018

FWIW, SDL also outputs zxdg_surface_v6@21: error 3: xdg_surface has never been configured, which doesn't happen on KWin.

@emersion
Copy link
Member Author

Hmm, can you run bt full? This one is more tricky.

@dos1
Copy link
Contributor

dos1 commented Oct 28, 2018

Segfaults are non-deterministic now :(

Now got this one:

(gdb) bt
#0  0x000055555555df2b in view_at
    (view=0x5555559d78f0, lx=lx@entry=59.999999999999993, ly=ly@entry=95, surface=surface@entry=0x7fffffffd440, sx=sx@entry=0x7fffffffd4a0, sy=sy@entry=0x7fffffffd4a8)
    at ../rootston/desktop.c:575
#1  0x000055555555f287 in desktop_view_at (sy=0x7fffffffd4a8, sx=0x7fffffffd4a0, surface=0x7fffffffd440, ly=95, lx=59.999999999999993, desktop=0x555555736120)
    at ../rootston/desktop.c:650
#2  0x000055555555f287 in desktop_surface_at
    (desktop=0x555555736120, lx=59.999999999999993, ly=95, sx=sx@entry=0x7fffffffd4a0, sy=sy@entry=0x7fffffffd4a8, view=view@entry=0x7fffffffd4b0) at ../rootston/desktop.c:714
#3  0x000055555555c26d in roots_passthrough_cursor (cursor=0x55555580a870, time=65122483) at ../rootston/cursor.c:113
#4  0x000055555555d162 in roots_cursor_handle_motion_absolute (cursor=0x55555580a870, event=0x7fffffffd620) at ../rootston/cursor.c:363
#5  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=0x55555580aa78, data=0x7fffffffd620) at ../util/signal.c:29
#6  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=0x5555557ca2c0, data=data@entry=0x7fffffffd620) at ../util/signal.c:29
#7  0x00007ffff7f9d0b0 in x11_handle_pointer_position (output=<optimized out>, x=<optimized out>, y=<optimized out>, time=65122483) at ../backend/x11/input_device.c:41
#8  0x00007ffff7f9d261 in handle_x11_input_event (x11=x11@entry=0x555555584770, event=event@entry=0x5555559ad0f0) at ../backend/x11/input_device.c:122
#9  0x00007ffff7f9c86b in handle_x11_event (event=0x5555559ad0f0, x11=0x555555584770) at ../backend/x11/backend.c:85
#10 0x00007ffff7f9c86b in x11_event (fd=<optimized out>, mask=<optimized out>, data=0x555555584770) at ../backend/x11/backend.c:85
#11 0x00007ffff7f3077f in wl_event_loop_dispatch () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#12 0x00007ffff7f2f2ac in wl_display_run () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#13 0x000055555555a24a in main (argc=<optimized out>, argv=0x7fffffffd9d8) at ../rootston/main.c:74
(gdb) bt full
#0  0x000055555555df2b in view_at
    (view=0x5555559d78f0, lx=lx@entry=59.999999999999993, ly=ly@entry=95, surface=surface@entry=0x7fffffffd440, sx=sx@entry=0x7fffffffd4a0, sy=sy@entry=0x7fffffffd4a8)
    at ../rootston/desktop.c:575
        view_sx = <optimized out>
        view_sy = <optimized out>
        state = <optimized out>
        box = <optimized out>
        _sx = 6.9533491518004593e-310
        _sy = 59.999999999999993
        _surface = <optimized out>
#1  0x000055555555f287 in desktop_view_at (sy=0x7fffffffd4a8, sx=0x7fffffffd4a0, surface=0x7fffffffd440, ly=95, lx=59.999999999999993, desktop=0x555555736120)
    at ../rootston/desktop.c:650
        output = 0x5555557d5460
        wlr_output = <optimized out>
        view = <optimized out>
        surface = 0x0
        wlr_output = 0x5555557ca040
        roots_output = 0x5555557d5460
        ox = 59.999999999999993
        oy = 95
        _view = <optimized out>
#2  0x000055555555f287 in desktop_surface_at
    (desktop=0x555555736120, lx=59.999999999999993, ly=95, sx=sx@entry=0x7fffffffd4a0, sy=sy@entry=0x7fffffffd4a8, view=view@entry=0x7fffffffd4b0) at ../rootston/desktop.c:714
        surface = 0x0
        wlr_output = 0x5555557ca040
        roots_output = 0x5555557d5460
        ox = 59.999999999999993
        oy = 95
        _view = <optimized out>
#3  0x000055555555c26d in roots_passthrough_cursor (cursor=0x55555580a870, time=65122483) at ../rootston/cursor.c:113
        focus_changed = <optimized out>
        sx = 95
        sy = -6.2193935599955454e+235
        view = 0x0
        seat = 0x55555580a310
        desktop = <optimized out>
        surface = <optimized out>
        client = <optimized out>
        drag_icon = <optimized out>
#4  0x000055555555d162 in roots_cursor_handle_motion_absolute (cursor=0x55555580a870, event=0x7fffffffd620) at ../rootston/cursor.c:363
        lx = 59.999999999999993
        ly = 95
#5  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=0x55555580aa78, data=0x7fffffffd620) at ../util/signal.c:29
        pos = 0x55555580a910
        l = 0x55555580a910
        cursor = {link = {prev = 0x55555580a910, next = 0x7fffffffd560}, notify = 0x7ffff7f9af20 <handle_noop>}
        end = {link = {prev = 0x7fffffffd540, next = 0x55555580aa78}, notify = 0x7ffff7f9af20 <handle_noop>}
#6  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=0x5555557ca2c0, data=data@entry=0x7fffffffd620) at ../util/signal.c:29
        pos = 0x5555559251f8
        l = 0x5555559251f8
        cursor = {link = {prev = 0x5555559251f8, next = 0x7fffffffd5d0}, notify = 0x7ffff7f9af20 <handle_noop>}
        end = {link = {prev = 0x7fffffffd5b0, next = 0x5555557ca2c0}, notify = 0x7ffff7f9af20 <handle_noop>}
#7  0x00007ffff7f9d0b0 in x11_handle_pointer_position (output=<optimized out>, x=<optimized out>, y=<optimized out>, time=65122483) at ../backend/x11/input_device.c:41
        x11 = 0x555555584770
        wlr_output = <optimized out>
        event = {device = 0x5555557ca2f8, time_msec = 65122483, x = 0.54545454545454541, y = 0.40425531914893614}
#8  0x00007ffff7f9d261 in handle_x11_input_event (x11=x11@entry=0x555555584770, event=event@entry=0x5555559ad0f0) at ../backend/x11/input_device.c:122
        ev = 0x5555559ad0f0
        output = <optimized out>
#9  0x00007ffff7f9c86b in handle_x11_event (event=0x5555559ad0f0, x11=0x555555584770) at ../backend/x11/backend.c:85
        e = 0x5555559ad0f0
        x11 = 0x555555584770
#10 0x00007ffff7f9c86b in x11_event (fd=<optimized out>, mask=<optimized out>, data=0x555555584770) at ../backend/x11/backend.c:85
        e = 0x5555559ad0f0
        x11 = 0x555555584770
#11 0x00007ffff7f3077f in wl_event_loop_dispatch () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#12 0x00007ffff7f2f2ac in wl_display_run () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#13 0x000055555555a24a in main (argc=<optimized out>, argv=0x7fffffffd9d8) at ../rootston/main.c:74
        __PRETTY_FUNCTION__ = "main"
        socket = <optimized out>
(gdb) 

@dos1
Copy link
Contributor

dos1 commented Oct 28, 2018

Another one:

(gdb) bt
#0  0x00005555555624ba in view_accept_damage (view=view@entry=0x5555559212c0, output=<optimized out>) at ../rootston/output.c:590
#1  0x0000555555563cc7 in output_damage_whole_view (output=output@entry=0xfffffffffffffff1, view=view@entry=0x5555559212c0) at ../rootston/output.c:670
#2  0x000055555555e61c in view_damage_whole (view=view@entry=0x5555559212c0) at ../rootston/desktop.c:530
#3  0x000055555555ed08 in view_update_position (view=0x5555559212c0, x=52.5, y=80.5) at ../rootston/desktop.c:539
#4  0x000055555555edcd in view_move (view=view@entry=0x5555559212c0, x=<optimized out>, y=<optimized out>) at ../rootston/desktop.c:143
#5  0x0000555555563441 in render_output (output=0x5555557d5460) at ../rootston/output.c:460
#6  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=0x5555557cb630, data=0x5555557cb5d0) at ../util/signal.c:29
#7  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=signal@entry=0x5555557ca160, data=data@entry=0x5555557ca040) at ../util/signal.c:29
#8  0x00007ffff7f8f467 in wlr_output_send_frame (output=output@entry=0x5555557ca040) at ../types/wlr_output.c:542
#9  0x00007ffff7f9d39a in signal_frame (data=0x5555557ca040) at ../backend/x11/output.c:13
#10 0x00007ffff7f3001a in  () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#11 0x00007ffff7f30702 in wl_event_loop_dispatch () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#12 0x00007ffff7f2f2ac in wl_display_run () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#13 0x000055555555a24a in main (argc=<optimized out>, argv=0x7fffffffd9d8) at ../rootston/main.c:74
(gdb) bt full
#0  0x00005555555624ba in view_accept_damage (view=view@entry=0x5555559212c0, output=<optimized out>) at ../rootston/output.c:590
#1  0x0000555555563cc7 in output_damage_whole_view (output=output@entry=0xfffffffffffffff1, view=view@entry=0x5555559212c0) at ../rootston/output.c:670
        data = {layout = {x = 1.4821969375237396e-323, y = 6.9533558072879748e-310, width = -10896, height = 32767, rotation = -1.01143099e+34}, output = 0x7fffffffd370}
#2  0x000055555555e61c in view_damage_whole (view=view@entry=0x5555559212c0) at ../rootston/desktop.c:530
        output = 0xfffffffffffffff1
#3  0x000055555555ed08 in view_update_position (view=0x5555559212c0, x=52.5, y=80.5) at ../rootston/desktop.c:539
#4  0x000055555555edcd in view_move (view=view@entry=0x5555559212c0, x=<optimized out>, y=<optimized out>) at ../rootston/desktop.c:143
        before = {x = 0, y = 0, width = 0, height = 0}
#5  0x0000555555563441 in render_output (output=0x5555557d5460) at ../rootston/output.c:460
        view = 0x5555559212c0
        view_box = {x = 0, y = 0, width = 0, height = 0}
        view_x = <optimized out>
        view_y = <optimized out>
        wlr_output = 0x5555557ca040
        desktop = 0x555555736120
        server = 0x555555573060 <server>
        renderer = 0x555555726c90
        __PRETTY_FUNCTION__ = "render_output"
        now = {tv_sec = 65819, tv_nsec = 710998574}
        clear_color = {0.25, 0.25, 0.25, 1}
        output_box = 0x5555557cbca0
        needs_swap = false
        damage = {extents = {x1 = -153258576, y1 = 32767, x2 = 0, y2 = 0}, data = 0x7ffff6dd7490 <ffi_type_pointer>}
        data = 
          {layout = {x = 0, y = 0, width = 1435092992, height = 21845, rotation = 3.58732407e-43}, output = 0x55555589c7f0, when = 0x7ffff7f34b89, damage = 0x110, alpha = -4.93661118e+33}
        nrects = 4
        rects = <optimized out>
#6  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=0x5555557cb630, data=0x5555557cb5d0) at ../util/signal.c:29
        pos = 0x5555557d5550
        l = 0x5555557d5550
        cursor = {link = {prev = 0x5555557d5550, next = 0x7fffffffd5f0}, notify = 0x7ffff7f9af20 <handle_noop>}
        end = {link = {prev = 0x7fffffffd5d0, next = 0x5555557cb630}, notify = 0x7ffff7f9af20 <handle_noop>}
#7  0x00007ffff7f9afae in wlr_signal_emit_safe (signal=signal@entry=0x5555557ca160, data=data@entry=0x5555557ca040) at ../util/signal.c:29
        pos = 0x5555557cb6c8
        l = 0x5555557cb6c8
        cursor = {link = {prev = 0x5555557cb6c8, next = 0x7fffffffd660}, notify = 0x7ffff7f9af20 <handle_noop>}
        end = {link = {prev = 0x7fffffffd640, next = 0x5555557ca160}, notify = 0x7ffff7f9af20 <handle_noop>}
#8  0x00007ffff7f8f467 in wlr_output_send_frame (output=output@entry=0x5555557ca040) at ../types/wlr_output.c:542
#9  0x00007ffff7f9d39a in signal_frame (data=0x5555557ca040) at ../backend/x11/output.c:13
        output = 0x5555557ca040
#10 0x00007ffff7f3001a in  () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#11 0x00007ffff7f30702 in wl_event_loop_dispatch () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#12 0x00007ffff7f2f2ac in wl_display_run () at /usr/bin/../../../../../../../lib64/libwayland-server.so.0
#13 0x000055555555a24a in main (argc=<optimized out>, argv=0x7fffffffd9d8) at ../rootston/main.c:74
        __PRETTY_FUNCTION__ = "main"
        socket = <optimized out>
(gdb)

@ammen99
Copy link
Member

ammen99 commented Oct 28, 2018

@dos1 can you try compiling with ASAN enabled, then redirect stdout & stderr to a file and try to reproduce the crash?

@dos1
Copy link
Contributor

dos1 commented Oct 28, 2018

2018-10-28 21:55:51 - [types/wlr_surface.c:626] New wlr_surface 0x61800000b480 (res 0x60c00002b900)
2018-10-28 21:55:51 - [rootston/cursor.c:505] Denying request to set cursor from unfocused client
2018-10-28 21:55:51 - [types/wlr_surface.c:626] New wlr_surface 0x61800000b880 (res 0x60c00002be40)
2018-10-28 21:55:51 - [types/xdg_shell_v6/wlr_xdg_surface_v6.c:485] new xdg_surface 0x612000164ec0 (res 0x60c00002bf00)
2018-10-28 21:55:51 - [rootston/xdg_shell_v6.c:411] new xdg toplevel: title=(null), app_id=animatch
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
error in client communication (pid 18276)
=================================================================
==18211==ERROR: AddressSanitizer: heap-use-after-free on address 0x612000165268 at pc 0x5594650e7bb7 bp 0x7ffce5adbd60 sp 0x7ffce5adbd50
READ of size 8 at 0x612000165268 thread T0
    #0 0x5594650e7bb6 in render_output ../rootston/output.c:464
    #1 0x7fc2c2362eaa in wlr_signal_emit_safe ../util/signal.c:29
    #2 0x7fc2c2362eaa in wlr_signal_emit_safe ../util/signal.c:29
    #3 0x7fc2c2368cb1 in signal_frame ../backend/x11/output.c:13
    #4 0x7fc2c2269019  (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0xa019)
    #5 0x7fc2c2269701 in wl_event_loop_dispatch (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0xa701)
    #6 0x7fc2c22682ab in wl_display_run (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x92ab)
    #7 0x5594650cb660 in main ../rootston/main.c:74
    #8 0x7fc2c1a0d222 in __libc_start_main (/usr/bin/../../../../../../../lib64/libc.so.6+0x24222)
    #9 0x5594650cba0d in _start (/usr/bin/rootston+0xda0d)

0x612000165268 is located 168 bytes inside of 312-byte region [0x6120001651c0,0x6120001652f8)
freed by thread T0 here:
    #0 0x7fc2c24d1c19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:66
    #1 0x7fc2c2362eaa in wlr_signal_emit_safe ../util/signal.c:29
    #2 0x7fc2c232595d in destroy_xdg_surface_v6 ../types/xdg_shell_v6/wlr_xdg_surface_v6.c:100
    #3 0x7fc2c2267c7e  (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x8c7e)
    #4 0x7fc2c2267cee in wl_resource_destroy (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x8cee)
    #5 0x7fc2c23244b0 in xdg_client_v6_handle_resource_destroy ../types/xdg_shell_v6/wlr_xdg_shell_v6.c:72
    #6 0x7fc2c2267c7e  (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x8c7e)
    #7 0x7fc2c226c051  (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0xd051)
    #8 0x7fc2c226c55e  (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0xd55e)
    #9 0x7fc2c2267dfe in wl_client_destroy (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x8dfe)
    #10 0x7fc2c2267eda  (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x8eda)
    #11 0x7fc2c2269701 in wl_event_loop_dispatch (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0xa701)
    #12 0x7fc2c22682ab in wl_display_run (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x92ab)
    #13 0x5594650cb660 in main ../rootston/main.c:74
    #14 0x7fc2c1a0d222 in __libc_start_main (/usr/bin/../../../../../../../lib64/libc.so.6+0x24222)
    #15 0x5594650cba0d in _start (/usr/bin/rootston+0xda0d)

previously allocated by thread T0 here:
    #0 0x7fc2c24d2231 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:95
    #1 0x5594650d5aa9 in view_create ../rootston/desktop.c:38
    #2 0x5594650f9adc in handle_xdg_shell_v6_surface ../rootston/xdg_shell_v6.c:443
    #3 0x7fc2c2362eaa in wlr_signal_emit_safe ../util/signal.c:29
    #4 0x7fc2c2326346 in handle_xdg_surface_v6_commit ../types/xdg_shell_v6/wlr_xdg_surface_v6.c:402
    #5 0x7fc2c2356bb9 in surface_commit_pending ../types/wlr_surface.c:402
    #6 0x7fc2c23576ec in surface_commit ../types/wlr_surface.c:474
    #7 0x7fc2c0f351c7 in ffi_call_unix64 (/usr/bin/../../../../../../../lib64/libffi.so.6+0x61c7)
    #8 0x7fc2c0f34c29 in ffi_call (/usr/bin/../../../../../../../lib64/libffi.so.6+0x5c29)
    #9 0x7fc2c226b6fe  (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0xc6fe)
    #10 0x7fc2c22680a2  (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x90a2)
    #11 0x7fc2c2269701 in wl_event_loop_dispatch (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0xa701)
    #12 0x7fc2c22682ab in wl_display_run (/usr/bin/../../../../../../../lib64/libwayland-server.so.0+0x92ab)
    #13 0x5594650cb660 in main ../rootston/main.c:74
    #14 0x7fc2c1a0d222 in __libc_start_main (/usr/bin/../../../../../../../lib64/libc.so.6+0x24222)
    #15 0x5594650cba0d in _start (/usr/bin/rootston+0xda0d)

SUMMARY: AddressSanitizer: heap-use-after-free ../rootston/output.c:464 in render_output
Shadow bytes around the buggy address:
  0x0c24800249f0: fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c2480024a00: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c2480024a10: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2480024a20: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa
  0x0c2480024a30: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
=>0x0c2480024a40: fd fd fd fd fd fd fd fd fd fd fd fd fd[fd]fd fd
  0x0c2480024a50: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
  0x0c2480024a60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2480024a70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2480024a80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2480024a90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==18211==ABORTING

@emersion
Copy link
Member Author

emersion commented Oct 28, 2018

Pushed a fix, can you try again?

You'll now likely hit the

zxdg_surface_v6@21: error 3: xdg_surface has never been configured

error, which is probably a SDL issue. We're more strict than KWin when it comes to Wayland protocol conformance.

@dos1
Copy link
Contributor

dos1 commented Oct 28, 2018

ASAN doesn't complain anymore and rootston hasn't segfaulted so far 👍

The window doesn't appear at all and SDL shows that xdg_surface error as predicted, but yeah, that's a different issue.

@dos1
Copy link
Contributor

dos1 commented Oct 29, 2018

While SDL2 apps work fine on KWin and Mutter, they fail the same way like on Sway/rootston also on Weston, so I guess you're right and it's likely a protocol violation on SDL2 side.

Other than that, the segfaults seem to be fixed now, thanks! :)

@dos1
Copy link
Contributor

dos1 commented Nov 1, 2018

Turns out SDL 2.0.9 already fixes that as well, so everything works great now \o/

@ddevault ddevault merged commit 675cf84 into swaywm:master Nov 1, 2018
@ddevault
Copy link
Contributor

ddevault commented Nov 1, 2018

Thanks!

@emersion emersion deleted the view-at-unmapped branch January 18, 2019 13:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants