libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
8.74k stars 1.65k forks source link

SDL2 memory leak in WSL2 #9888

Open MrWeast opened 1 month ago

MrWeast commented 1 month ago

Using very basic program of: image

I get a pretty substantial memory leak: image

slouken commented 1 month ago

Out of curiosity, does this happen with SDL3?

MrWeast commented 1 month ago

I'm not sure. I haven't tried SDL3. My understanding is that an official stable release hasn't come out yet for SDL3 so I was waiting on that before trying out SDL3.

madebr commented 1 month ago

SDL2 built under WSL2, is similar to building SDL2 on Linux. So aren't leaks from 3rd party libraries expected? Most/all leaks are from libdecor, gtk and dbus.

MrWeast commented 1 month ago

Using these suppressions with valgrind:

{ wsl2 Memcheck:Leak ... obj:/usr/lib/wsl/drivers/* ... }

{ valgrind_leaks Memcheck:Leak ... obj:/usr/libexec/valgrind/* ... }

Will suppress all of the memory leaks: image