GNOME Bugzilla – Bug 100553
Incorrect test on valloc return in gst/cothreads.c
Last modified: 2004-12-22 21:47:04 UTC
Causes some apps using multithreaded pipelines to fail with the message "Could not valloc stack !" on FreeBSD (and presumably any other systems without posix_memalign). The following one-line diff against 0.4.2 fixes the problem: --- gst/cothreads.c.orig Fri Dec 6 19:40:17 2002 +++ gst/cothreads.c Sun Dec 1 22:54:17 2002 @@ -550,7 +550,7 @@ GST_DEBUG (GST_CAT_THREAD, "have posix_memalign at %p of size %d", (void *) *stack, STACK_SIZE); #else - if ((*stack = valloc (STACK_SIZE)) != 0) + if ((*stack = valloc (STACK_SIZE)) == 0) { g_warning ("Could not valloc stack !\n"); return FALSE;
commited to cvs