This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] manual: Document getcontext uc_stack value on Linux [BZ #759]
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 11 Jul 2017 15:28:14 -0300
- Subject: Re: [PATCH] manual: Document getcontext uc_stack value on Linux [BZ #759]
- Authentication-results: sourceware.org; auth=none
- References: <1494961861-30734-1-git-send-email-adhemerval.zanella@linaro.org> <6d9cf350-c221-3fac-0088-384b42c45adb@linaro.org> <77500c0f-e6f6-43b8-b7b3-b3af65a5b968@linaro.org> <CAKCAbMiS7Ep7MhanttLCZ5VLTGBR3w92gPqckxBmeJh-PHkzHw@mail.gmail.com>
On 11/07/2017 15:23, Zack Weinberg wrote:
> On Tue, Jul 11, 2017 at 1:56 PM, Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>> Ping (x2). I think something we won't bother to emulate solaris behaviour,
>> so in a short we should document it and close it.
>
> I agree that existing behavior should not be changed, but the text you
> proposed for the manual doesn't make a lot of sense unless you already
> know what the problem is.
>
>>>> +On Linux the stack information return on @code{uc_stack} is empty by
>>>> +default. It also the case for signal handling information through
>>>> +@code{sigaction} with @code{SA_SIGINFO}. It could be obtained using
>>>> +architecture specific field from @code{uc_mcontext} member.
>
> @strong{Compatibility Note:} Depending on the operating system,
> information about the current context's stack may be in the
> @code{uc_stack} field of @var{ucp}, or it may instead instead be in
> architecture-specific subfields of the @code{uc_mcontext} field.
>
> The detail regarding 'sigaction' belongs in the documentation for
> 'sigaction', and we currently don't document SA_SIGINFO at all, so I
> would just leave that bit out.
Right, I do not have a preference here about the wording but I do think
we should at least document Linux behaviour (which originated the bug
report). What about:
@strong{Compatibility Note:} Depending on the operating system,
information about the current context's stack may be in the
@code{uc_stack} field of @var{ucp}, or it may instead instead be in
architecture-specific subfields of the @code{uc_mcontext} field.
On Linux the current context's stack returned on @code{uc_stack}
is empty by default.