From David Callu, "I have a Segfault with xine plugin, when I load a video, then delete the XineStreamImage,

then reload a video and finally delete the second XineStreamImage.

In src/osgPlugins/xine/video_out_rgb.c, many code is ASM code, and 'clear()' function is one of them.
If OSG is compiled without the flag COMPILE_ASSEMBLY (default behaviours) the clear() function is an empty
function and allocated memory is never initialized to 0. So a structure which contain pointer haven't its pointer set to NULL.
And when we need to delete this pointer, all go bad.

I join the fixed file."
This commit is contained in:
Robert Osfield
2009-11-20 11:46:20 +00:00
parent d55f447188
commit 010411e535

View File

@@ -100,6 +100,8 @@ clear(void* dest, uint32_t size)
: "=&D" (dest)
: "r" (size >> 2), "r" (size & 3), "0" (dest)
: "eax", "ecx");
#else
memset(dest, 0, size);
#endif
}