Opened 12 years ago
Last modified 11 years ago
#10094 new enhancement
Valgrind's memcheck hard to use with VirtualBox OpenGL drivers — at Initial Version
Reported by: | wolf42 | Owned by: | |
---|---|---|---|
Component: | 3D support | Version: | VirtualBox 4.1.8 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | other |
Description
Host: Windows 7 64 bit with nvidia GPU.
Guest: Ubuntu with VirtualBox OpenGL driver.
Test case
/* gcc test.c `sdl-config --libs --cflags` */ #include <SDL.h> int main( int argc, char** argv ) { SDL_Init( SDL_INIT_VIDEO ); SDL_SetVideoMode( 16, 16, 32, SDL_OPENGL ); return 0; }
Steps to reproduce
- Compile the test case.
- Run the compiled program through valgrind's memcheck tool (run
valgrind ./a.out
).
Results
Valgrind reports a significant amount of errors originating in VirtualBox OpenGL driver. Example:
==3028== Conditional jump or move depends on uninitialised value(s) ==3028== at 0x51193B9: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLpackspu.so) ==3028== by 0x50D588B: crNetDispatchMessage (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x50DF2EB: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x50DEBCE: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x50DEF64: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x50D517B: crNetSend (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x511962D: packspuFlush (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLpackspu.so) ==3028== by 0x51178A8: packspu_CreateContext (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLpackspu.so) ==3028== by 0x57B42D2: feedbackspu_CreateContext (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLfeedbackspu.so) ==3028== by 0x501984C: stubMakeCurrent (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGL.so) ==3028== by 0x502EC53: vboxstub_glXMakeCurrent (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGL.so) ==3028== by 0x5031E49: vbox_glXMakeCurrent (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGL.so) ==3028== ==3028== Use of uninitialised value of size 4 ==3028== at 0x5119338: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLpackspu.so) ==3028== by 0x51193FC: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLpackspu.so) ==3028== by 0x50D588B: crNetDispatchMessage (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x50DF2EB: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x50DEBCE: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x50DEF64: ??? (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x50D517B: crNetSend (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLcrutil.so) ==3028== by 0x511962D: packspuFlush (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLpackspu.so) ==3028== by 0x51178A8: packspu_CreateContext (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLpackspu.so) ==3028== by 0x57B42D2: feedbackspu_CreateContext (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGLfeedbackspu.so) ==3028== by 0x501984C: stubMakeCurrent (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGL.so) ==3028== by 0x502EC53: vboxstub_glXMakeCurrent (in /opt/VBoxGuestAdditions-4.1.8/lib/VBoxOGL.so)
The amount of reported errors increases with each single OpenGL instruction used in code. Such behavior makes looking for real application errors very hard, if not impossible to do.
Note that, despite all the errors reported, VirtualBox OpenGL drivers do NOT misbehave in any way (whether running under valgrind or not).
Expected result
Valgrind reports no errors, or the errors number is very limited and they originate from SDL or X. This happens when the test case is run on a non-virtualized Linux machine with nvidia drivers.
Additional info
Other people also have reported this issue:
https://forums.virtualbox.org/viewtopic.php?f=6&t=32378
https://forums.virtualbox.org/viewtopic.php?f=3&t=45319