After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322441 - getcontext() in common/m4/gst-mcsc.m4 uses incorrect stack size, wrong # argc arguments to makecontext()
getcontext() in common/m4/gst-mcsc.m4 uses incorrect stack size, wrong # argc...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.11
Other HP-UX
: Normal normal
: 0.10.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-25 15:16 UTC by The Written Word
Modified: 2005-12-09 15:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
common/m4/gst-mcsc.m4 patch (927 bytes, patch)
2005-11-25 15:16 UTC, The Written Word
none Details | Review

Description The Written Word 2005-11-25 15:16:10 UTC
Version details: 0.8.11
Distribution/Version: 11.23/IA-64

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)
                perror("sigaltstack");

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?
Comment 1 The Written Word 2005-11-25 15:16:45 UTC
Created attachment 55228 [details] [review]
common/m4/gst-mcsc.m4 patch
Comment 2 Michael Smith 2005-12-09 15:11:14 UTC
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.