[vlc-commits] [Git][videolan/vlc][master] win32: thread: rename entrypoint vlc_entry -> ThreadEntry

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Feb 28 08:27:45 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b91a43e1 by Alexandre Janniaux at 2025-02-28T07:57:14+00:00
win32: thread: rename entrypoint vlc_entry -> ThreadEntry

Naming the thread entrypoint vlc_entry is confusing in some of the
stacktraces. In particular, for some reason, Qt's module entrypoint
refers to vlc_entry_license+xxxx (where xxxx is an offset) and it feels
like it's being called from the plugin's entrypoint.


        Thread 14 received signal SIGSEGV, Segmentation fault.
        [Switching to Thread 27108.0x6bf8]
        0x00007ffd41ff499f in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        (gdb) bt
        #0  0x00007ffd41ff499f in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #1  0x00007ffd41ff3d71 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #2  0x00007ffd410d57c5 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #3  0x00007ffd41f7458f in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #4  0x00007ffd4181a9b3 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #5  0x00007ffd414f00a8 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #6  0x00007ffd41a86513 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #7  0x00007ffd41bbf651 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #8  0x00007ffd4193bd97 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #9  0x00007ffd41bbf628 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #10 0x00007ffd410075fa in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #11 0x00007ffd414f3b0e in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #12 0x00007ffd408f65e0 in vlc_entry_license () from \\wsl.localhost\Debian\home\janniaux\vlc\build-win64\win64\modules\.libs\libqt_plugin.dll
        #13 0x00007ffd631f9dae in vlc_entry (p=0x266f8216810) at /home/janniaux/vlc/extras/package/win32/../../../src/win32/thread.c:354
        #14 0x00007ffdf728e634 in msvcrt!_beginthreadex () from C:\WINDOWS\System32\msvcrt.dll
        #15 0x00007ffdf728e70c in msvcrt!_endthreadex () from C:\WINDOWS\System32\msvcrt.dll
        #16 0x00007ffdf773259d in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
        #17 0x00007ffdf906af38 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
        #18 0x0000000000000000 in ?? ()
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)

- - - - -


1 changed file:

- src/win32/thread.c


Changes:

=====================================
src/win32/thread.c
=====================================
@@ -349,7 +349,7 @@ void vlc_atomic_notify_all(void *addr)
 /*** Threads ***/
 static
 unsigned
-__stdcall vlc_entry (void *p)
+__stdcall ThreadEntry (void *p)
 {
     struct vlc_thread *th = p;
 
@@ -379,7 +379,7 @@ int vlc_clone (vlc_thread_t *p_handle, void *(*entry) (void *),
      * function instead of CreateThread, otherwise you'll end up with
      * memory leaks and the signal functions not working (see Microsoft
      * Knowledge Base, article 104641) */
-    h = (HANDLE)(uintptr_t) _beginthreadex (NULL, 0, vlc_entry, th, 0, NULL);
+    h = (HANDLE)(uintptr_t) _beginthreadex (NULL, 0, ThreadEntry, th, 0, NULL);
     if (h == 0)
     {
         int err = errno;



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b91a43e1ddc055cf5dfecc082b8c8a683539901f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list