This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Eliminate third argument from _JMPBUF_UNWINDS
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: libc-alpha at sourceware dot org, Thomas Schwinge <tschwinge at gnu dot org>
- Date: Tue, 17 Jun 2014 16:47:20 -0700 (PDT)
- Subject: Re: [PATCH] Eliminate third argument from _JMPBUF_UNWINDS
- Authentication-results: sourceware.org; auth=none
- References: <871tuqmfad dot fsf at igel dot home> <20140616222134 dot 070EB2C397F at topped-with-meat dot com> <874mzkpi4d dot fsf at igel dot home>
> Roland McGrath <roland@hack.frob.com> writes:
>
> > This all but ensures that when a machine adds PTR_MANGLE/PTR_DEMANGLE
> > support, or changes how it does the mangling, that the corresponding
> > update in jmpbuf-unwind.h will be forgotten.
>
> That will not happen.
Your assertion alone does not reassure me.
What guarantees this will not happen?
> > How is this better?
>
> It removes a layer violation and consolidates the jmpbuf handling into
> the architecture header. The caller must not have knowlege of the
> jmpbuf internals.
In the current scheme the caller does not have knowledge of jmp_buf
internals. It is required to supply a function that performs PTR_DEMANGLE.
That's all it knows. _JMPBUF_UNWINDS has the knowledge of how that
function is useful in interpreting a jmp_buf.