Open thomas-touhey opened 1 month ago
Do you have a call stack for the crash? Valgrind is pointing out coding errors in the WSL D3D code, which we can't do anything about.
What can I do to obtain that? :)
Run your program under gdb, and type bt
when it crashes?
Still trying to reproduce the issue on local setup, and got feedback on the behalf of my contributor today. They tested with valgrind again, I pointed out you suggested using gdb with bt
and I did not get an answer for this specifically yet.
In the mean time, they managed to encounter other crashes in slightly different configurations:
Hi, I'm the original reporter of this issue. I apologize for not using gbd when @thomas-touhey commented because I got different valgrind results the next day and I had to set up another ArchWSL instance to reproduce the initial result. Right now this is what gdb
gives me:
The minimal script didn't seem to trigger crash but gbd stopped at [New Thread 0x7fff3b7fe6c0 (LWP 4780)]
, and I had to interrupt manually to get the call stack info.
That isn't a crash call stack though... ?
That isn't a crash call stack though... ?
gdb doesn't prompt any crash while the minimal script is running, so I can't get the crash call stack atm.
Update: I was able to reproduce the result that prompts segfault explicitly:
Then I ran it immediately with gdb. This time gdb stopped when segfault occured:
@Kontrabant, it looks like this is crashing in WAYLAND_xkb_context_new() with a NULL pointer. Aren't we checking that symbols were successfully loaded before calling that?
Yes, the first thing Wayland_CreateDevice() does is load the Wayland symbols, including the xkb library. That symbol is non-optional, so loading the Wayland driver should fail if it can't be found.
@0v0katai, can you apply this patch and send us the output?
diff --git a/src/video/wayland/SDL_waylanddyn.c b/src/video/wayland/SDL_waylanddyn.c
index ea15da397..77fe2adb5 100644
--- a/src/video/wayland/SDL_waylanddyn.c
+++ b/src/video/wayland/SDL_waylanddyn.c
@@ -59,6 +59,9 @@ static void *WAYLAND_GetSym(const char *fnname, int *pHasModule, bool required)
if (dynlib->lib) {
fn = SDL_LoadFunction(dynlib->lib, fnname);
if (fn) {
+ if (SDL_strcmp(fnname, "xkb_context_new") == 0) {
+ SDL_Log("xkb_context_new found in %s\n", dynlib->libname);
+ }
break;
}
}
They requested my help in running the script using SDL with your patch, hence I'm placing the instructions I've found worked on my computer:
cd /tmp
# Clone and patch SDL3
git clone https://github.com/libsdl-org/SDL && cd SDL
curl -o log.patch https://haste.breizh.pm/raw/xozehubigo
patch -i log.patch -u src/video/wayland/SDL_waylanddyn.c
# Build SDL3
# Based on: https://wiki.libsdl.org/SDL3/Installation
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DSDL_SHARED=FALSE -DSDL_STATIC=TRUE ..
cmake --build . --config Debug --parallel
# Get, compile and run SDL script.
curl -o sdl3_crash.c https://haste.breizh.pm/raw/jukuyoyafo
gcc -g sdl3_crash.c -L. -lSDL3 -lm -Iinclude/ -I../include/ -I../include/SDL3
./a.out
For reference, sdl3_crash.c
is basically sdl2_crash.c
ported to SDL3, using the migration guide, with the following source code:
Thanks @thomas-touhey. The SDL3 minimal script no longer segfaults and outputs the following message:
Failed to initialize SDL: No available video device
This looks correct, thanks!
With SDL2, creating a software renderer using
SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE)
causes a segmentation fault on ArchWSL with WSLg on WSL 2, while the expected behaviour would (probably) be to fail with an error.As found by the original issue reporter, creating
/etc/tmpfiles.d/wslg.conf
with the following content then restarting the WSL session solves the problem (source):However the program still shouldn't have segfaulted, and should have just printed
Couldn't create the renderer: xyz
then exited.A minimal program to produce the crash is the following:
sdl2_crash.c
```c /* Compile with `gcc sdl2_crash.c -g $(pkg-config sdl2 --cflags --libs)` */ #includeWhen run with
valgrind --leak-check=full --num-callers=500 ./a.out
, the following output is created:valgrind report of the crash
``` ==2985== Memcheck, a memory error detector ==2985== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==2985== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info ==2985== Command: ./a.out ==2985== ==2985== Conditional jump or move depends on uninitialised value(s) ==2985== at 0x125DD9DC: ??? (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x125DE713: ??? (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x125A090F: ??? (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x125A58B5: ??? (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x125A1AD0: DXCoreCreateAdapterFactory (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x62C799B: get_dxcore_factory (d3d12_dxcore_screen.cpp:53) ==2985== by 0x62C799B: d3d12_init_dxcore_screen(d3d12_screen*) (d3d12_dxcore_screen.cpp:184) ==2985== by 0x62C7F14: d3d12_create_dxcore_screen (d3d12_dxcore_screen.cpp:243) ==2985== by 0x56A1EEE: sw_screen_create_named (sw_helper.h:66) ==2985== by 0x56A1EEE: sw_screen_create_vk (sw_helper.h:90) ==2985== by 0x5DEE6CC: pipe_loader_sw_create_screen (pipe_loader_sw.c:427) ==2985== by 0x5DEE5FF: pipe_loader_create_screen_vk (pipe_loader.c:181) ==2985== by 0x56C926E: drisw_init_screen (drisw.c:603) ==2985== by 0x56D30BF: driCreateNewScreen3 (dri_util.c:140) ==2985== by 0x5639FAD: dri2_create_screen (egl_dri2.c:927) ==2985== by 0x563BB5B: dri2_initialize_device (platform_device.c:365) ==2985== by 0x563A9E8: dri2_initialize (egl_dri2.c:1058) ==2985== by 0x562894B: eglInitialize (eglapi.c:699) ==2985== by 0x4947868: UnknownInlinedFun (SDL_egl.c:623) ==2985== by 0x4947868: UnknownInlinedFun (SDL_offscreenopengles.c:43) ==2985== by 0x4947868: OFFSCREEN_GLES_LoadLibrary (SDL_offscreenopengles.c:31) ==2985== by 0x492FF52: SDL_GL_LoadLibrary_REAL (SDL_video.c:3469) ==2985== by 0x492EBF1: SDL_RecreateWindow (SDL_video.c:1990) ==2985== by 0x48BCAA3: GL_CreateRenderer.lto_priv.0 (SDL_render_gl.c:1728) ==2985== by 0x48B20BE: SDL_CreateRenderer_REAL (SDL_render.c:1028) ==2985== by 0x492BC4D: SDL_CreateWindowTexture.lto_priv.0 (SDL_video.c:267) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2711) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2772) ==2985== by 0x493036F: SDL_GetWindowSurface_REAL (SDL_video.c:2761) ==2985== by 0x48DCBBA: SW_CreateRenderer.lto_priv.0 (SDL_render_sw.c:1063) ==2985== by 0x48B24AF: SDL_CreateRenderer_REAL (SDL_render.c:1009) ==2985== by 0x10931B: main (sdl2_crash.c:40) ==2985== ==2985== Conditional jump or move depends on uninitialised value(s) ==2985== at 0x125DE272: ??? (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x125DE713: ??? (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x125A090F: ??? (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x125A58B5: ??? (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x125A1AD0: DXCoreCreateAdapterFactory (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x62C799B: get_dxcore_factory (d3d12_dxcore_screen.cpp:53) ==2985== by 0x62C799B: d3d12_init_dxcore_screen(d3d12_screen*) (d3d12_dxcore_screen.cpp:184) ==2985== by 0x62C7F14: d3d12_create_dxcore_screen (d3d12_dxcore_screen.cpp:243) ==2985== by 0x56A1EEE: sw_screen_create_named (sw_helper.h:66) ==2985== by 0x56A1EEE: sw_screen_create_vk (sw_helper.h:90) ==2985== by 0x5DEE6CC: pipe_loader_sw_create_screen (pipe_loader_sw.c:427) ==2985== by 0x5DEE5FF: pipe_loader_create_screen_vk (pipe_loader.c:181) ==2985== by 0x56C926E: drisw_init_screen (drisw.c:603) ==2985== by 0x56D30BF: driCreateNewScreen3 (dri_util.c:140) ==2985== by 0x5639FAD: dri2_create_screen (egl_dri2.c:927) ==2985== by 0x563BB5B: dri2_initialize_device (platform_device.c:365) ==2985== by 0x563A9E8: dri2_initialize (egl_dri2.c:1058) ==2985== by 0x562894B: eglInitialize (eglapi.c:699) ==2985== by 0x4947868: UnknownInlinedFun (SDL_egl.c:623) ==2985== by 0x4947868: UnknownInlinedFun (SDL_offscreenopengles.c:43) ==2985== by 0x4947868: OFFSCREEN_GLES_LoadLibrary (SDL_offscreenopengles.c:31) ==2985== by 0x492FF52: SDL_GL_LoadLibrary_REAL (SDL_video.c:3469) ==2985== by 0x492EBF1: SDL_RecreateWindow (SDL_video.c:1990) ==2985== by 0x48BCAA3: GL_CreateRenderer.lto_priv.0 (SDL_render_gl.c:1728) ==2985== by 0x48B20BE: SDL_CreateRenderer_REAL (SDL_render.c:1028) ==2985== by 0x492BC4D: SDL_CreateWindowTexture.lto_priv.0 (SDL_video.c:267) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2711) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2772) ==2985== by 0x493036F: SDL_GetWindowSurface_REAL (SDL_video.c:2761) ==2985== by 0x48DCBBA: SW_CreateRenderer.lto_priv.0 (SDL_render_sw.c:1063) ==2985== by 0x48B24AF: SDL_CreateRenderer_REAL (SDL_render.c:1009) ==2985== by 0x10931B: main (sdl2_crash.c:40) ==2985== ==2985== Syscall param ioctl(generic) points to uninitialised byte(s) ==2985== at 0x4B49CED: ioctl (ioctl.c:36) ==2985== by 0x12616712: D3DKMTQueryAdapterInfo (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x12A543FA: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12E01452: ??? (in /usr/lib/wsl/drivers/iigd_dch.inf_amd64_9741ef1f4093481f/libigd12umd64.so) ==2985== by 0x12E010D0: OpenAdapter12 (in /usr/lib/wsl/drivers/iigd_dch.inf_amd64_9741ef1f4093481f/libigd12umd64.so) ==2985== by 0x12A67780: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12A536A7: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12982B2B: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x1298287F: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12983488: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12984E3F: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x1293D962: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x62C9849: create_device (d3d12_screen.cpp:1020) ==2985== by 0x62C9849: d3d12_init_screen(d3d12_screen*, IUnknown*) (d3d12_screen.cpp:1557) ==2985== by 0x62C7CCA: d3d12_init_dxcore_screen(d3d12_screen*) (d3d12_dxcore_screen.cpp:220) ==2985== by 0x62C7F14: d3d12_create_dxcore_screen (d3d12_dxcore_screen.cpp:243) ==2985== by 0x56A1EEE: sw_screen_create_named (sw_helper.h:66) ==2985== by 0x56A1EEE: sw_screen_create_vk (sw_helper.h:90) ==2985== by 0x5DEE6CC: pipe_loader_sw_create_screen (pipe_loader_sw.c:427) ==2985== by 0x5DEE5FF: pipe_loader_create_screen_vk (pipe_loader.c:181) ==2985== by 0x56C926E: drisw_init_screen (drisw.c:603) ==2985== by 0x56D30BF: driCreateNewScreen3 (dri_util.c:140) ==2985== by 0x5639FAD: dri2_create_screen (egl_dri2.c:927) ==2985== by 0x563BB5B: dri2_initialize_device (platform_device.c:365) ==2985== by 0x563A9E8: dri2_initialize (egl_dri2.c:1058) ==2985== by 0x562894B: eglInitialize (eglapi.c:699) ==2985== by 0x4947868: UnknownInlinedFun (SDL_egl.c:623) ==2985== by 0x4947868: UnknownInlinedFun (SDL_offscreenopengles.c:43) ==2985== by 0x4947868: OFFSCREEN_GLES_LoadLibrary (SDL_offscreenopengles.c:31) ==2985== by 0x492FF52: SDL_GL_LoadLibrary_REAL (SDL_video.c:3469) ==2985== by 0x492EBF1: SDL_RecreateWindow (SDL_video.c:1990) ==2985== by 0x48BCAA3: GL_CreateRenderer.lto_priv.0 (SDL_render_gl.c:1728) ==2985== by 0x48B20BE: SDL_CreateRenderer_REAL (SDL_render.c:1028) ==2985== by 0x492BC4D: SDL_CreateWindowTexture.lto_priv.0 (SDL_video.c:267) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2711) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2772) ==2985== by 0x493036F: SDL_GetWindowSurface_REAL (SDL_video.c:2761) ==2985== by 0x48DCBBA: SW_CreateRenderer.lto_priv.0 (SDL_render_sw.c:1063) ==2985== by 0x48B24AF: SDL_CreateRenderer_REAL (SDL_render.c:1009) ==2985== by 0x10931B: main (sdl2_crash.c:40) ==2985== Address 0x1ffeff8b44 is on thread 1's stack ==2985== in frame #1, created by D3DKMTQueryAdapterInfo (???:) ==2985== ==2985== Syscall param ioctl(generic) points to uninitialised byte(s) ==2985== at 0x4B49CED: ioctl (ioctl.c:36) ==2985== by 0x12616712: D3DKMTQueryAdapterInfo (in /usr/lib/wsl/lib/libdxcore.so) ==2985== by 0x12A543FA: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12E0148B: ??? (in /usr/lib/wsl/drivers/iigd_dch.inf_amd64_9741ef1f4093481f/libigd12umd64.so) ==2985== by 0x12E01107: OpenAdapter12 (in /usr/lib/wsl/drivers/iigd_dch.inf_amd64_9741ef1f4093481f/libigd12umd64.so) ==2985== by 0x12A67780: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12A536A7: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12982B2B: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x1298287F: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12983488: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x12984E3F: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x1293D962: ??? (in /usr/lib/wsl/lib/libd3d12core.so) ==2985== by 0x62C9849: create_device (d3d12_screen.cpp:1020) ==2985== by 0x62C9849: d3d12_init_screen(d3d12_screen*, IUnknown*) (d3d12_screen.cpp:1557) ==2985== by 0x62C7CCA: d3d12_init_dxcore_screen(d3d12_screen*) (d3d12_dxcore_screen.cpp:220) ==2985== by 0x62C7F14: d3d12_create_dxcore_screen (d3d12_dxcore_screen.cpp:243) ==2985== by 0x56A1EEE: sw_screen_create_named (sw_helper.h:66) ==2985== by 0x56A1EEE: sw_screen_create_vk (sw_helper.h:90) ==2985== by 0x5DEE6CC: pipe_loader_sw_create_screen (pipe_loader_sw.c:427) ==2985== by 0x5DEE5FF: pipe_loader_create_screen_vk (pipe_loader.c:181) ==2985== by 0x56C926E: drisw_init_screen (drisw.c:603) ==2985== by 0x56D30BF: driCreateNewScreen3 (dri_util.c:140) ==2985== by 0x5639FAD: dri2_create_screen (egl_dri2.c:927) ==2985== by 0x563BB5B: dri2_initialize_device (platform_device.c:365) ==2985== by 0x563A9E8: dri2_initialize (egl_dri2.c:1058) ==2985== by 0x562894B: eglInitialize (eglapi.c:699) ==2985== by 0x4947868: UnknownInlinedFun (SDL_egl.c:623) ==2985== by 0x4947868: UnknownInlinedFun (SDL_offscreenopengles.c:43) ==2985== by 0x4947868: OFFSCREEN_GLES_LoadLibrary (SDL_offscreenopengles.c:31) ==2985== by 0x492FF52: SDL_GL_LoadLibrary_REAL (SDL_video.c:3469) ==2985== by 0x492EBF1: SDL_RecreateWindow (SDL_video.c:1990) ==2985== by 0x48BCAA3: GL_CreateRenderer.lto_priv.0 (SDL_render_gl.c:1728) ==2985== by 0x48B20BE: SDL_CreateRenderer_REAL (SDL_render.c:1028) ==2985== by 0x492BC4D: SDL_CreateWindowTexture.lto_priv.0 (SDL_video.c:267) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2711) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2772) ==2985== by 0x493036F: SDL_GetWindowSurface_REAL (SDL_video.c:2761) ==2985== by 0x48DCBBA: SW_CreateRenderer.lto_priv.0 (SDL_render_sw.c:1063) ==2985== by 0x48B24AF: SDL_CreateRenderer_REAL (SDL_render.c:1009) ==2985== by 0x10931B: main (sdl2_crash.c:40) ==2985== Address 0x1ffeff8b44 is on thread 1's stack ==2985== in frame #1, created by D3DKMTQueryAdapterInfo (???:) ==2985== ==2985== Warning: invalid file descriptor -1 in syscall close() ==2985== ==2985== HEAP SUMMARY: ==2985== in use at exit: 354,590 bytes in 2,471 blocks ==2985== total heap usage: 102,856 allocs, 100,385 frees, 77,655,799 bytes allocated ==2985== ==2985== 112 (56 direct, 56 indirect) bytes in 1 blocks are definitely lost in loss record 2,311 of 2,371 ==2985== at 0x484BC13: calloc (vg_replace_malloc.c:1675) ==2985== by 0x637365E: ??? ==2985== by 0x5DEE1F4: ??? ==2985== by 0x5DD6711: ??? ==2985== by 0x5DD68F7: ??? ==2985== by 0x5D81766: ??? ==2985== by 0x5D84621: ??? ==2985== by 0x5D7EFF5: ??? ==2985== by 0x5D20500: ??? ==2985== by 0x5D67AB9: ??? ==2985== by 0x5D633A8: ??? ==2985== by 0x5CEDB02: ??? ==2985== by 0x5CE6529: ??? ==2985== by 0x5CE69A7: ??? ==2985== by 0x5CE6E6C: ??? ==2985== by 0x5E16497: ??? ==2985== by 0x593F306: ??? ==2985== by 0x48BB534: GL_RunCommandQueue (SDL_render_gl.c:1374) ==2985== by 0x48AEB70: FlushRenderCommands.lto_priv.0 (SDL_render.c:249) ==2985== by 0x48B57D7: UnknownInlinedFun (SDL_render.c:278) ==2985== by 0x48B57D7: SDL_RenderCopyF_REAL (SDL_render.c:3509) ==2985== by 0x492AFD4: UnknownInlinedFun (SDL_render.c:3404) ==2985== by 0x492AFD4: SDL_UpdateWindowTexture.lto_priv.0 (SDL_video.c:374) ==2985== by 0x492FD73: SDL_UpdateWindowSurface_REAL (SDL_video.c:2791) ==2985== by 0x48B7B6D: UnknownInlinedFun (SDL_render.c:4269) ==2985== by 0x48B7B6D: SDL_RenderPresent_REAL (SDL_render.c:4255) ==2985== by 0x109422: main (sdl2_crash.c:78) ==2985== ==2985== 512 bytes in 1 blocks are possibly lost in loss record 2,347 of 2,371 ==2985== at 0x48447A8: malloc (vg_replace_malloc.c:446) ==2985== by 0x40112F0: malloc (rtld-malloc.h:56) ==2985== by 0x40112F0: _dl_resize_dtv (dl-tls.c:527) ==2985== by 0x4011C71: _dl_update_slotinfo (dl-tls.c:849) ==2985== by 0x4011DA3: update_get_addr (dl-tls.c:967) ==2985== by 0x4014C9B: __tls_get_addr (tls_get_addr.S:55) ==2985== by 0x10100F54: __cxa_get_globals (eh_globals.cc:62) ==2985== by 0x101021C0: __cxa_throw (eh_throw.cc:83) ==2985== by 0x1327A160: ??? ==2985== by 0x1327114B: ??? ==2985== by 0x1326F4CB: ??? ==2985== by 0x13241E2E: ??? ==2985== by 0x12E012C4: ??? ==2985== by 0x12E0115C: ??? ==2985== by 0x12A67780: ??? ==2985== by 0x12A536A7: ??? ==2985== by 0x12982B2B: ??? ==2985== by 0x1298287F: ??? ==2985== by 0x12983488: ??? ==2985== by 0x12984E3F: ??? ==2985== by 0x1293D962: ??? ==2985== by 0x62C9849: ??? ==2985== by 0x62C7CCA: ??? ==2985== by 0x62C7F14: ??? ==2985== by 0x56A1EEE: ??? ==2985== by 0x5DEE6CC: ??? ==2985== by 0x5DEE5FF: ??? ==2985== by 0x56C926E: ??? ==2985== by 0x56D30BF: ??? ==2985== by 0x5639FAD: ??? ==2985== by 0x563BB5B: ??? ==2985== by 0x563A9E8: ??? ==2985== by 0x562894B: ??? ==2985== by 0x4947868: UnknownInlinedFun (SDL_egl.c:623) ==2985== by 0x4947868: UnknownInlinedFun (SDL_offscreenopengles.c:43) ==2985== by 0x4947868: OFFSCREEN_GLES_LoadLibrary (SDL_offscreenopengles.c:31) ==2985== by 0x492FF52: SDL_GL_LoadLibrary_REAL (SDL_video.c:3469) ==2985== by 0x492EBF1: SDL_RecreateWindow (SDL_video.c:1990) ==2985== by 0x48BCAA3: GL_CreateRenderer.lto_priv.0 (SDL_render_gl.c:1728) ==2985== by 0x48B20BE: SDL_CreateRenderer_REAL (SDL_render.c:1028) ==2985== by 0x492BC4D: SDL_CreateWindowTexture.lto_priv.0 (SDL_video.c:267) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2711) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2772) ==2985== by 0x493036F: SDL_GetWindowSurface_REAL (SDL_video.c:2761) ==2985== by 0x48DCBBA: SW_CreateRenderer.lto_priv.0 (SDL_render_sw.c:1063) ==2985== by 0x48B24AF: SDL_CreateRenderer_REAL (SDL_render.c:1009) ==2985== by 0x10931B: main (sdl2_crash.c:40) ==2985== ==2985== 2,688 bytes in 1 blocks are definitely lost in loss record 2,360 of 2,371 ==2985== at 0x484BC13: calloc (vg_replace_malloc.c:1675) ==2985== by 0x5633D2F: ??? ==2985== by 0x56346BE: ??? ==2985== by 0x5613941: ??? ==2985== by 0x494784F: UnknownInlinedFun (SDL_egl.c:617) ==2985== by 0x494784F: UnknownInlinedFun (SDL_offscreenopengles.c:43) ==2985== by 0x494784F: OFFSCREEN_GLES_LoadLibrary (SDL_offscreenopengles.c:31) ==2985== by 0x492FF52: SDL_GL_LoadLibrary_REAL (SDL_video.c:3469) ==2985== by 0x492EBF1: SDL_RecreateWindow (SDL_video.c:1990) ==2985== by 0x48BCAA3: GL_CreateRenderer.lto_priv.0 (SDL_render_gl.c:1728) ==2985== by 0x48B20BE: SDL_CreateRenderer_REAL (SDL_render.c:1028) ==2985== by 0x492BC4D: SDL_CreateWindowTexture.lto_priv.0 (SDL_video.c:267) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2711) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2772) ==2985== by 0x493036F: SDL_GetWindowSurface_REAL (SDL_video.c:2761) ==2985== by 0x48DCBBA: SW_CreateRenderer.lto_priv.0 (SDL_render_sw.c:1063) ==2985== by 0x48B24AF: SDL_CreateRenderer_REAL (SDL_render.c:1009) ==2985== by 0x10931B: main (sdl2_crash.c:40) ==2985== ==2985== 30,264 (24 direct, 30,240 indirect) bytes in 1 blocks are definitely lost in loss record 2,368 of 2,371 ==2985== at 0x48447A8: malloc (vg_replace_malloc.c:446) ==2985== by 0x13241DD6: ??? ==2985== by 0x12E012C4: ??? ==2985== by 0x12E0115C: ??? ==2985== by 0x12A67780: ??? ==2985== by 0x12A536A7: ??? ==2985== by 0x12982B2B: ??? ==2985== by 0x1298287F: ??? ==2985== by 0x12983488: ??? ==2985== by 0x12984E3F: ??? ==2985== by 0x1293D962: ??? ==2985== by 0x62C9849: ??? ==2985== by 0x62C7CCA: ??? ==2985== by 0x62C7F14: ??? ==2985== by 0x56A1EEE: ??? ==2985== by 0x5DEE6CC: ??? ==2985== by 0x5DEE5FF: ??? ==2985== by 0x56C926E: ??? ==2985== by 0x56D30BF: ??? ==2985== by 0x5639FAD: ??? ==2985== by 0x563BB5B: ??? ==2985== by 0x563A9E8: ??? ==2985== by 0x562894B: ??? ==2985== by 0x4947868: UnknownInlinedFun (SDL_egl.c:623) ==2985== by 0x4947868: UnknownInlinedFun (SDL_offscreenopengles.c:43) ==2985== by 0x4947868: OFFSCREEN_GLES_LoadLibrary (SDL_offscreenopengles.c:31) ==2985== by 0x492FF52: SDL_GL_LoadLibrary_REAL (SDL_video.c:3469) ==2985== by 0x492EBF1: SDL_RecreateWindow (SDL_video.c:1990) ==2985== by 0x48BCAA3: GL_CreateRenderer.lto_priv.0 (SDL_render_gl.c:1728) ==2985== by 0x48B20BE: SDL_CreateRenderer_REAL (SDL_render.c:1028) ==2985== by 0x492BC4D: SDL_CreateWindowTexture.lto_priv.0 (SDL_video.c:267) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2711) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2772) ==2985== by 0x493036F: SDL_GetWindowSurface_REAL (SDL_video.c:2761) ==2985== by 0x48DCBBA: SW_CreateRenderer.lto_priv.0 (SDL_render_sw.c:1063) ==2985== by 0x48B24AF: SDL_CreateRenderer_REAL (SDL_render.c:1009) ==2985== by 0x10931B: main (sdl2_crash.c:40) ==2985== ==2985== 30,264 (24 direct, 30,240 indirect) bytes in 1 blocks are definitely lost in loss record 2,369 of 2,371 ==2985== at 0x48447A8: malloc (vg_replace_malloc.c:446) ==2985== by 0x13241DD6: ??? ==2985== by 0x12E012C4: ??? ==2985== by 0x12E0115C: ??? ==2985== by 0x12A67780: ??? ==2985== by 0x12A536A7: ??? ==2985== by 0x12982B2B: ??? ==2985== by 0x1298287F: ??? ==2985== by 0x12983488: ??? ==2985== by 0x12984E3F: ??? ==2985== by 0x1293D962: ??? ==2985== by 0x62C9A26: ??? ==2985== by 0x62C7CCA: ??? ==2985== by 0x62C7F14: ??? ==2985== by 0x56A1EEE: ??? ==2985== by 0x5DEE6CC: ??? ==2985== by 0x5DEE5FF: ??? ==2985== by 0x56C926E: ??? ==2985== by 0x56D30BF: ??? ==2985== by 0x5639FAD: ??? ==2985== by 0x563BB5B: ??? ==2985== by 0x563A9E8: ??? ==2985== by 0x562894B: ??? ==2985== by 0x4947868: UnknownInlinedFun (SDL_egl.c:623) ==2985== by 0x4947868: UnknownInlinedFun (SDL_offscreenopengles.c:43) ==2985== by 0x4947868: OFFSCREEN_GLES_LoadLibrary (SDL_offscreenopengles.c:31) ==2985== by 0x492FF52: SDL_GL_LoadLibrary_REAL (SDL_video.c:3469) ==2985== by 0x492EBF1: SDL_RecreateWindow (SDL_video.c:1990) ==2985== by 0x48BCAA3: GL_CreateRenderer.lto_priv.0 (SDL_render_gl.c:1728) ==2985== by 0x48B20BE: SDL_CreateRenderer_REAL (SDL_render.c:1028) ==2985== by 0x492BC4D: SDL_CreateWindowTexture.lto_priv.0 (SDL_video.c:267) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2711) ==2985== by 0x493036F: UnknownInlinedFun (SDL_video.c:2772) ==2985== by 0x493036F: SDL_GetWindowSurface_REAL (SDL_video.c:2761) ==2985== by 0x48DCBBA: SW_CreateRenderer.lto_priv.0 (SDL_render_sw.c:1063) ==2985== by 0x48B24AF: SDL_CreateRenderer_REAL (SDL_render.c:1009) ==2985== by 0x10931B: main (sdl2_crash.c:40) ==2985== ==2985== LEAK SUMMARY: ==2985== definitely lost: 2,792 bytes in 4 blocks ==2985== indirectly lost: 60,536 bytes in 3 blocks ==2985== possibly lost: 512 bytes in 1 blocks ==2985== still reachable: 290,670 bytes in 2,461 blocks ==2985== suppressed: 80 bytes in 2 blocks ==2985== Reachable blocks (those to which a pointer was found) are not shown. ==2985== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==2985== ==2985== Use --track-origins=yes to see where uninitialised values come from ==2985== For lists of detected and suppressed errors, rerun with: -s ==2985== ERROR SUMMARY: 11 errors from 9 contexts (suppressed: 2 from 2) ```Originally reported on Cahute as issue #57.