| Summary: | Memory leak on simplest possible example | ||
|---|---|---|---|
| Product: | SDL | Reporter: | jightuse |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.2 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | minimal_example.c | ||
|
Description
jightuse
2014-04-12 08:44:24 UTC
Stack trace with dbg packages installed: $ valgrind --leak-check=full ./a.out ==11828== Memcheck, a memory error detector ==11828== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==11828== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info ==11828== Command: ./a.out ==11828== ==11828== ==11828== HEAP SUMMARY: ==11828== in use at exit: 76,368 bytes in 516 blocks ==11828== total heap usage: 19,239 allocs, 18,723 frees, 44,848,319 bytes allocated ==11828== ==11828== 12 bytes in 2 blocks are definitely lost in loss record 5 of 100 ==11828== at 0x4C274A0: malloc (vg_replace_malloc.c:291) ==11828== by 0x51B5829: strdup (strdup.c:42) ==11828== by 0x6195666: _XimEncodeString (imRm.c:818) ==11828== by 0x6196474: _XimSetICValueData (imRm.c:2912) ==11828== by 0x6191A69: _XimLocalCreateIC (imLcIc.c:176) ==11828== by 0x6178044: XCreateIC (ICWrap.c:247) ==11828== by 0x4EEBCD2: SetupWindowData (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4EEC0F7: X11_CreateWindow (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4EDF5FF: SDL_CreateWindow_REAL (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4EDF40F: SDL_VideoInit_REAL (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4E4A48E: SDL_InitSubSystem_REAL (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4006BA: main (minimal_example.c:4) ==11828== ==11828== 104 bytes in 1 blocks are definitely lost in loss record 58 of 100 ==11828== at 0x4C274A0: malloc (vg_replace_malloc.c:291) ==11828== by 0xBC79A11: ??? (in /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2.0) ==11828== by 0xBC52600: ??? (in /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2.0) ==11828== by 0xBC4EE7A: ??? (in /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2.0) ==11828== by 0xBC4F60F: glXChooseVisual (in /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2.0) ==11828== by 0x4EE8D0E: X11_GL_GetVisual (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4EE8F40: X11_GL_LoadLibrary (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4EDDB65: SDL_GL_LoadLibrary_REAL (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4EDF6FB: SDL_CreateWindow_REAL (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4EDF40F: SDL_VideoInit_REAL (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4E4A48E: SDL_InitSubSystem_REAL (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2.0) ==11828== by 0x4006BA: main (minimal_example.c:4) ==11828== ==11828== LEAK SUMMARY: ==11828== definitely lost: 116 bytes in 3 blocks ==11828== indirectly lost: 0 bytes in 0 blocks ==11828== possibly lost: 0 bytes in 0 blocks ==11828== still reachable: 76,252 bytes in 513 blocks ==11828== suppressed: 0 bytes in 0 blocks ==11828== Reachable blocks (those to which a pointer was found) are not shown. ==11828== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==11828== ==11828== For counts of detected and suppressed errors, rerun with: -v ==11828== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 6 from 3) |