GNOME Bugzilla – Bug 322441
getcontext() in common/m4/gst-mcsc.m4 uses incorrect stack size, wrong # argc arguments to makecontext()
Last modified: 2005-12-09 15:11:14 UTC
Version details: 0.8.11
The AC_CHECK_MCSC test in common/m4/gst-mcsc.m4 loops forevery on
ia64-hp-hpux11.23 because the stack size is incorrect. According to
sigaltstack(2) on this platform:
The value SIGSTKSZ is a system default specifying the number of bytes
that would be used to cover the usual case when manually allocating an
alternate stack area. The value MINSIGSTKSZ is defined to be the
minimum stack size for a signal handler. In computing an alternate
stack size, a program should add that amount to its stack requirements
to allow for the system implementation overhead.
The following code fragment illustrates a method for allocating memory
for an alternate stack:
if ((sigstk.ss_sp = malloc(SIGSTKSZ)) == NULL)
/* error return */
sigstk.ss_size = SIGSTKSZ;
sigstk.ss_flags = 0;
if (sigaltstack(&sigstk,(stack_t *)0) < 0)
SIGSTKSZ is defined to 262144 on this platform.
Also, the 3rd arg of makecontext is the number of arguments to the function
defined in the 2nd argument. As child() takes 1 argument, the 3rd arg should be
1, not 2.
Does the common/m4/gst-mcsc.m4 change require any source code changes in gstreamer?
Created attachment 55228 [details] [review]
Whilst this patch looks sensible, 0.10 no longer needs getcontext or makecontext
(it was used for cothreads stuff, I think), so I've just removed these instead.
If you note any other problems building 0.10 on hpux, please let us know.