Consensus on MT-, AS- and AC-Safety docs.
Joseph S. Myers
joseph@codesourcery.com
Mon Nov 25 09:53:00 GMT 2013
On Fri, 22 Nov 2013, Torvald Riegel wrote:
> > Documenting limitations of safety only makes sense if we wish to support
> > use of the function in a particular context provided the user follows
> > particular rules. In this case, and probably many cases for AS-Safety, I
> > think we should just say AS-Unsafe - we don't want to support this in
> > signal handlers at all, under any circumstances, and so don't need to
> > document anything about what makes it unsafe, just that it is unsafe.
>
> I'd prefer if we'd put macros with this information into the
> documentation, even if we should choose to let them expand to empty
> strings. Right now, I don't see much of a benefit of maintaining the
> reasons somewhere external.
I'm happy with some cases expanding to nothing - but if the conclusion
from the reasons given is either "fundamentally unsafe with the current
implementation" (e.g. malloc in signal handlers, even if we don't know if
the function really should be using malloc) or "fundamentally unsafe and
we don't intend to change that", I don't think the *formatted manual*
should give detailed reasons, just the statement of lack of safety and the
indication of whether this is the intended API or just information about
the current implementation.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list