Valgrind output |
Robert Winkler
Guest
|
I've been using SDL 2 on a project for a while now and I often run it under valgrind. I've long since discounted the memory lost errors but today I noticed these new "conditional jump depends on uninitialized values" errors.
I tested it on 2.0.3 and the latest code. Maybe it's been there longer and I just haven't run valgrind with -v in a while. It looks like they happen at the very beginning and my program has a lot of output so I usually just see the summary at the end. Linux robert-desktop 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux My SDL window code is: SDL_Window* window = SDL_CreateWindow("swrenderer", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WIDTH, HEIGHT, SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE); Anyway, just fyi. Hopefully someone hasn't already reported this. ==14591== HEAP SUMMARY: ==14591== in use at exit: 90,067 bytes in 570 blocks ==14591== total heap usage: 63,694 allocs, 63,124 frees, 26,531,161 bytes allocated ==14591== ==14591== Searching for pointers to 570 not-freed blocks ==14591== Checked 9,233,096 bytes ==14591== ==14591== 22 bytes in 2 blocks are definitely lost in loss record 10 of 135 ==14591== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==14591== by 0x5A028C1: strdup (strdup.c:42) ==14591== by 0x6FD0F86: ??? (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FD1D94: _XimSetICValueData (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FCD439: _XimLocalCreateIC (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FB39A4: XCreateIC (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x4F13A4A: SetupWindowData (SDL_x11window.c:240) ==14591== by 0x4F13E86: X11_CreateWindow (SDL_x11window.c:553) ==14591== by 0x4F02E2B: SDL_CreateWindow_REAL (SDL_video.c:1289) ==14591== by 0x4F02AAF: SDL_VideoInit_REAL (SDL_video.c:189) ==14591== by 0x4E4681E: SDL_Init_REAL (SDL.c:173) ==14591== by 0x413F11: setup_context() (main.cpp:309) ==14591== ==14591== 22 bytes in 2 blocks are definitely lost in loss record 11 of 135 ==14591== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==14591== by 0x5A028C1: strdup (strdup.c:42) ==14591== by 0x6FD0F86: ??? (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FD1D94: _XimSetICValueData (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FCD439: _XimLocalCreateIC (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FB39A4: XCreateIC (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x4F13A4A: SetupWindowData (SDL_x11window.c:240) ==14591== by 0x4F13E86: X11_CreateWindow (SDL_x11window.c:553) ==14591== by 0x4F02E2B: SDL_CreateWindow_REAL (SDL_video.c:1289) ==14591== by 0x413FAF: setup_context() (main.cpp:318) ==14591== by 0x412F41: main (main.cpp:120) ==14591== ==14591== 22 bytes in 2 blocks are definitely lost in loss record 12 of 135 ==14591== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==14591== by 0x5A028C1: strdup (strdup.c:42) ==14591== by 0x6FD0F86: ??? (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FD1D94: _XimSetICValueData (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FCD439: _XimLocalCreateIC (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x6FB39A4: XCreateIC (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x4F13A4A: SetupWindowData (SDL_x11window.c:240) ==14591== by 0x4F13E86: X11_CreateWindow (SDL_x11window.c:553) ==14591== by 0x4EFEC3C: SDL_RecreateWindow (SDL_video.c:1388) ==14591== by 0x4E97A73: GL_CreateRenderer (SDL_render_gl.c:404) ==14591== by 0x4E8EE7D: SDL_CreateRenderer_REAL (SDL_render.c:269) ==14591== by 0x4EFF3D2: SDL_CreateWindowTexture (SDL_video.c:257) ==14591== ==14591== 66 bytes in 2 blocks are definitely lost in loss record 82 of 135 ==14591== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==14591== by 0x6F8E4F0: XGetWindowProperty (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==14591== by 0x4F0AC67: X11_DispatchEvent (SDL_x11events.c:572) ==14591== by 0x4F0B737: X11_PumpEvents (SDL_x11events.c:1017) ==14591== by 0x4E7F518: SDL_PollEvent_REAL (SDL_events.c:402) ==14591== by 0x4140E4: handle_events() (main.cpp:356) ==14591== by 0x413BE3: main (main.cpp:248) ==14591== ==14591== 79 bytes in 1 blocks are definitely lost in loss record 85 of 135 ==14591== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==14591== by 0x8BFF4EC: ??? (in /usr/lib/nvidia-304/libGL.so.304.8 ==14591== by 0x6F722F656D6F682E: ??? ==14591== by 0x6F72702F74726561: ??? ==14591== by 0x676E696D6D617266: ??? ==14591== by 0x65704F2F2B2B432E: ??? ==14591== by 0x5F77656E2F4C476D: ??? ==14591== by 0x737463656A6F726F: ??? ==14591== by 0x6E65727773796D2E: ??? ==14591== by 0x75622F7265726563: ??? ==14591== by 0x657277732F646C68: ??? ==14591== by 0x72657265646D: ??? ==14591== ==14591== LEAK SUMMARY: ==14591== definitely lost: 211 bytes in 9 blocks ==14591== indirectly lost: 0 bytes in 0 blocks ==14591== possibly lost: 0 bytes in 0 blocks ==14591== still reachable: 89,856 bytes in 561 blocks ==14591== suppressed: 0 bytes in 0 blocks ==14591== Reachable blocks (those to which a pointer was found) are not shown. ==14591== To see them, rerun with: --leak-check=full --show-reachable=yes ==14591== ==14591== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 10 from 3) ==14591== ==14591== 1 errors in context 1 of 9: ==14591== Conditional jump or move depends on uninitialised value(s) ==14591== at 0xA5F5B58: ??? (in /usr/lib/nvidia-304/libnvidia-glcore.so.304.8 ==14591== Uninitialised value was created by a stack allocation ==14591== at 0x4E964B0: GL_UpdateViewport (SDL_render_gl.c:934) ==14591== ==14591== ==14591== 1 errors in context 2 of 9: ==14591== Conditional jump or move depends on uninitialised value(s) ==14591== at 0xA5F5AB6: ??? (in /usr/lib/nvidia-304/libnvidia-glcore.so.304.8 ==14591== Uninitialised value was created by a stack allocation ==14591== at 0x4E964B0: GL_UpdateViewport (SDL_render_gl.c:934) ==14591== ==14591== ==14591== 1 errors in context 3 of 9: ==14591== Conditional jump or move depends on uninitialised value(s) ==14591== at 0xA5F5AAD: ??? (in /usr/lib/nvidia-304/libnvidia-glcore.so.304.8 ==14591== Uninitialised value was created by a stack allocation ==14591== at 0x4E964B0: GL_UpdateViewport (SDL_render_gl.c:934) ==14591== ==14591== ==14591== 1 errors in context 4 of 9: ==14591== Conditional jump or move depends on uninitialised value(s) ==14591== at 0xA24327A: ??? (in /usr/lib/nvidia-304/libnvidia-glcore.so.304.8 ==14591== by 0xA24377F: ??? (in /usr/lib/nvidia-304/libnvidia-glcore.so.304.8 ==14591== by 0xBF65FFF: ??? ==14591== Uninitialised value was created by a stack allocation ==14591== at 0x4E964B0: GL_UpdateViewport (SDL_render_gl.c:934) ==14591== --14591-- --14591-- used_suppression: 8 X on SUSE11 writev uninit padding --14591-- used_suppression: 2 dl-hack3-cond-1 ==14591== ==14591== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 10 from 3) -- Rob robertwinkler.com |
|||||||||||
|
Valgrind output |
Ryan C. Gordon
Guest
|
Can I see the program that triggers this, so I can reproduce it here? Thanks, --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Valgrind output |
Luke Groeninger
Guest
|
I’m almost positive the “conditional jump depends on uninitialized values" issues are false-positives within the Nvidia OpenGL library, but I don’t have a Linux dev environment set up to verify it. I seem to remember this being an issue, though, and a quick google search confirms that it used to be an issue.
-Luke On Mar 31, 2014, at 6:28 PM, Robert Winkler wrote:
|
|||||||||||||
|