This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/759] [i386] getcontext() not setting arg's uc_stack correctly


https://sourceware.org/bugzilla/show_bug.cgi?id=759

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #2 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
In fact this behavior is not currently followed by any architecture I can check
(aarch64, arm, alpha, hppa, m68k, mips, mips64, mips64n32, powerpc, powerpc64,
powerpc64le, s390x, sh, sparc, sparc64, and x86).

And I think we should not change current behavior for 3 main reasons:

1. POSIX 2008 removed this SySV interface for a good reason and changing this
behavior adds nothing for current portable code.  POSIX 2001 specification does
states that stack should be saved [1] and current GLIBC code does in a
arch-specific manner (inside the mcontext_t) which allows the setcontext to
work correctly.

2. Changing this behavior would potentially require compat symbols and I see no
gain in adding compat symbols for deprecated interfaces.

3. Also, for comment #2, it is up to kernel do setup the contents for
ucontext_t and currently it does not provide the stack information as well. 
Trying to change it is also another fix that does not worth the possible gains.

Instead my proposal is to make it clear the current interface behavior in glibc
documentation and close this bug as invalid.

[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/getcontext.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]