[vlc-commits] [Git][videolan/vlc][master] egl_pbuffer: fix wrong display being used for delete

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Nov 7 03:11:12 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ad11e4be by Alexandre Janniaux at 2026-11-07T02:57:07+00:00
egl_pbuffer: fix wrong display being used for delete

When eglInitialize fails (for instance in my case, glibc mismatch
preventing the loading), the wrong "display" was released, leading to
the following ASAN trace:


    [00007c3ff4a14090] egl_display_gbm generic: EGL using GBM platform on device /dev/dri/renderD128 (fd=8)
    ../src/misc/objects.c:131:5: runtime error: member access within null pointer of type 'struct vlc_object_internals_t'
    AddressSanitizer:DEADLYSIGNAL
    =================================================================
    ==1848247==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000028 (pc 0x7ffff6e03b7c bp 0x7bffdb61f240 sp 0x7bffdb61f220 T6)
    ==1848247==The signal is caused by a READ memory access.
    ==1848247==Hint: address points to the zero page.
    [00007dfff49f3080] main input debug: waiting decoder fifos to empty
    [00007dfff49f3080] main input debug: waiting decoder fifos to empty
    [00007dfff49f3080] main input debug: waiting decoder fifos to empty
    [00007dfff49f3080] main input debug: waiting decoder fifos to empty
    [00007dfff49f3080] main input debug: waiting decoder fifos to empty
        #0 0x7ffff6e03b7c in vlc_object_deinit ../src/misc/objects.c:131
        #1 0x7ffff6e03c4b in vlc_object_delete ../src/misc/objects.c:143
        #2 0x7bffdfc24147 in vlc_egl_display_Delete ../modules/video_output/opengl/egl_display.c:70
        #3 0x7bffdfc20321 in InitEGL ../modules/video_filter/egl_pbuffer.c:139
        #4 0x7bffdfc20bc9 in Open ../modules/video_filter/egl_pbuffer.c:397
        #5 0x7ffff6d70932 in vlc_gl_start ../src/video_output/opengl.c:53
        #6 0x7ffff6b5ae06 in vlc_module_load ../src/modules/modules.c:230
        #7 0x7ffff6d71a50 in vlc_gl_CreateOffscreen ../src/video_output/opengl.c:155
        #8 0x7bffdfcf5636 in CreateGL ../modules/video_filter/opengl.c:211
        #9 0x7bffdfcf5933 in OpenOpenGL ../modules/video_filter/opengl.c:241
        #10 0x7ffff6e1fce7 in vlc_filter_LoadModule ../src/misc/filter_chain.c:65
        #11 0x7ffff6e20747 in filter_chain_AppendInner ../src/misc/filter_chain.c:335
        #12 0x7ffff6e21882 in filter_chain_AppendFilter ../src/misc/filter_chain.c:368
        #13 0x7ffff6d2fce9 in ChangeFilters ../src/video_output/video_output.c:938
        #14 0x7ffff6d30d9c in UpdateDeinterlaceFilter ../src/video_output/video_output.c:1568
        #15 0x7ffff6d339e5 in DisplayPicture ../src/video_output/video_output.c:1661
        #16 0x7ffff6d33fea in Thread ../src/video_output/video_output.c:2011
        #17 0x7ffff7868296 in asan_thread_start(void*) (/nix/store/7a2cjhcgzyym5zaz6m4fksw47qvm150w-gcc-16.2.0-lib/lib/libasan.so.8+0x68296)
        #18 0x7ffff5a9f750 in start_thread (/nix/store/pqyiidz5mi73wv5f91d48s9plcqyj5bz-glibc-2.44-57/lib/libc.so.6+0x9f750) (BuildId: 342d94d33e8a929e8d32ff5226646738d2236e4a)
        #19 0x7ffff5b2ba4b in __clone3 (/nix/store/pqyiidz5mi73wv5f91d48s9plcqyj5bz-glibc-2.44-57/lib/libc.so.6+0x12ba4b) (BuildId: 342d94d33e8a929e8d32ff5226646738d2236e4a)

    ==1848247==Register values:
    rax = 0x00007ffff5f8a940  rbx = 0x00007ddff4a21480  rcx = 0x00007ffff5e1e4ab  rdx = 0x0000000000000005
    rdi = 0x0000000000000028  rsi = 0x00007bffdb61f210  rbp = 0x00007bffdb61f240  rsp = 0x00007bffdb61f220
     r8 = 0x00007bffdb61ec66   r9 = 0x0000000000000097  r10 = 0x0000000000000001  r11 = 0x0000000000000206
    r12 = 0x0000000000000000  r13 = 0x00000f7ffb582020  r14 = 0x00007caff4a17a90  r15 = 0x00000f8dfe94b703
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV ../src/misc/objects.c:131 in vlc_object_deinit
    Thread T6 (vlc-vout) created by T3 (vlc-dec-video) here:
        #0 0x7ffff7922e2e in pthread_create (/nix/store/7a2cjhcgzyym5zaz6m4fksw47qvm150w-gcc-16.2.0-lib/lib/libasan.so.8+0x122e2e)
        #1 0x7ffff6e5b569 in vlc_clone_attr ../src/posix/thread.c:179
        #2 0x7ffff6e5ba57 in vlc_clone ../src/posix/thread.c:190
        #3 0x7ffff6d3dee2 in vout_Request ../src/video_output/video_output.c:2471
        #4 0x7ffff6cd1bff in input_resource_RequestVout ../src/input/resource.c:495
        #5 0x7ffff6be6e05 in ModuleThread_UpdateVideoFormat ../src/input/decoder.c:807
        #6 0x7ffff6c0527f in decoder_UpdateVideoOutput ../src/input/decoder_helpers.c:212
        #7 0x7ffff6c054a6 in decoder_UpdateVideoFormat ../src/input/decoder_helpers.c:112
        #8 0x7ffff5264854 in DecodeFrame ../modules/codec/rawvideo.c:250
        #9 0x7ffff6bf545c in DecoderThread_DecodeBlock ../src/input/decoder.c:1796
        #10 0x7ffff6bf5308 in DecoderThread_ProcessInput ../src/input/decoder.c:1922
        #11 0x7ffff6bf68dd in DecoderThread ../src/input/decoder.c:2082
        #12 0x7ffff7868296 in asan_thread_start(void*) (/nix/store/7a2cjhcgzyym5zaz6m4fksw47qvm150w-gcc-16.2.0-lib/lib/libasan.so.8+0x68296)

    Thread T3 (vlc-dec-video) created by T2 (vlc-input) here:
        #0 0x7ffff7922e2e in pthread_create (/nix/store/7a2cjhcgzyym5zaz6m4fksw47qvm150w-gcc-16.2.0-lib/lib/libasan.so.8+0x122e2e)
        #1 0x7ffff6e5b569 in vlc_clone_attr ../src/posix/thread.c:179
        #2 0x7ffff6e5ba57 in vlc_clone ../src/posix/thread.c:190
        #3 0x7ffff6bf138b in decoder_New ../src/input/decoder.c:2470
        #4 0x7ffff6bf81c0 in vlc_input_decoder_New ../src/input/decoder.c:2492
        #5 0x7ffff6c325c6 in EsOutCreateDecoder ../src/input/es_out.c:2651
        #6 0x7ffff6c330f3 in EsOutSelectEs ../src/input/es_out.c:2800
        #7 0x7ffff6c347f7 in EsOutSelect ../src/input/es_out.c:3044
        #8 0x7ffff6c2e5fd in EsOutVaPrivControlLocked ../src/input/es_out.c:4076
        #9 0x7ffff6c4496a in EsOutPrivControl ../src/input/es_out.c:4396
        #10 0x7ffff6c45ba1 in es_out_in_vaPrivControl ../src/input/es_out_timeshift.c:478
        #11 0x7ffff6c4a34b in es_out_in_PrivControl ../src/input/es_out_timeshift.c:489
        #12 0x7ffff6c4a92f in CmdExecutePrivControl ../src/input/es_out_timeshift.c:1922
        #13 0x7ffff6c5344c in PrivControlLocked ../src/input/es_out_timeshift.c:781
        #14 0x7ffff6c53976 in PrivControl ../src/input/es_out_timeshift.c:858
        #15 0x7ffff6c57140 in es_out_vaPrivControl ../src/input/es_out.h:134
        #16 0x7ffff6c595fd in es_out_PrivControl ../src/input/es_out.h:142
        #17 0x7ffff6c59d53 in es_out_SetMode ../src/input/es_out.h:150
        #18 0x7ffff6c62144 in InitPrograms ../src/input/input.c:1266
        #19 0x7ffff6c7d872 in Init ../src/input/input.c:1358
        #20 0x7ffff6c7f124 in Run ../src/input/input.c:416
        #21 0x7ffff7868296 in asan_thread_start(void*) (/nix/store/7a2cjhcgzyym5zaz6m4fksw47qvm150w-gcc-16.2.0-lib/lib/libasan.so.8+0x68296)

    Thread T2 (vlc-input) created by T0 here:
        #0 0x7ffff7922e2e in pthread_create (/nix/store/7a2cjhcgzyym5zaz6m4fksw47qvm150w-gcc-16.2.0-lib/lib/libasan.so.8+0x122e2e)
        #1 0x7ffff6e5b569 in vlc_clone_attr ../src/posix/thread.c:179
        #2 0x7ffff6e5ba57 in vlc_clone ../src/posix/thread.c:190
        #3 0x7ffff6c6d4fc in input_Start ../src/input/input.c:134
        #4 0x7ffff6ca72b6 in vlc_player_input_Start ../src/player/input.c:101
        #5 0x7ffff6c918a1 in vlc_player_Start ../src/player/player.c:1288
        #6 0x7ffff6b82d0b in vlc_playlist_Start ../src/playlist/player.c:182
        #7 0x7ffff6b73483 in libvlc_InternalPlay ../src/interface/interface.c:178
        #8 0x55555555a142 in main ../bin/vlc.c:255
        #9 0x7ffff5a2b390 in __libc_start_call_main (/nix/store/pqyiidz5mi73wv5f91d48s9plcqyj5bz-glibc-2.44-57/lib/libc.so.6+0x2b390) (BuildId: 342d94d33e8a929e8d32ff5226646738d2236e4a)
        #10 0x7ffff5a2b4a7 in __libc_start_main_impl (/nix/store/pqyiidz5mi73wv5f91d48s9plcqyj5bz-glibc-2.44-57/lib/libc.so.6+0x2b4a7) (BuildId: 342d94d33e8a929e8d32ff5226646738d2236e4a)
        #11 0x555555559404 in _start (/home/janniaux/workspace/vlc/repo/build/bin/vlc+0x5404)

    ==1848247==ABORTING

- - - - -


1 changed file:

- modules/video_filter/egl_pbuffer.c


Changes:

=====================================
modules/video_filter/egl_pbuffer.c
=====================================
@@ -136,7 +136,7 @@ static int InitEGL(vlc_gl_t *gl, int opengl_api, unsigned width, unsigned height
     EGLint major, minor;
     if (eglInitialize(sys->display, &major, &minor) != EGL_TRUE)
     {
-        vlc_egl_display_Delete(sys->display);
+        vlc_egl_display_Delete(sys->vlc_display);
         return VLC_EGENERIC;
     }
     msg_Dbg(gl, "EGL version %s by %s, API %s",



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ad11e4bec1facba01d385a126dd5ccd89d99b117

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ad11e4bec1facba01d385a126dd5ccd89d99b117
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list