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: Andreas Schwab <schwab at linux-m68k dot org>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org, Thomas Schwinge <tschwinge at gnu dot org>
- Date: Wed, 18 Jun 2014 18:43:05 +0200
- 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> <20140617234720 dot ABBCE2C3994 at topped-with-meat dot com>
Roland McGrath <roland@hack.frob.com> writes:
>> 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?
Because I obviously didn't change anything here. If you think there is
something wrong then it's not my fault.
> 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.
It is still a layering violation and bad code duplication. The callers
are not suposed to know about the mangling. Moreover, the macros is
useless without demangling.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."