This is the mail archive of the
mailing list for the glibc project.
Re: ctermid: return string literal, document MT-Safety pitfall
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 13 Nov 2014 19:03:05 -0200
- Subject: Re: ctermid: return string literal, document MT-Safety pitfall
- Authentication-results: sourceware.org; auth=none
- References: <ortx2b8l2k dot fsf at free dot home> <54620F80 dot 3030001 at redhat dot com>
On Nov 11, 2014, Florian Weimer <email@example.com> wrote:
> On 11/07/2014 09:35 AM, Alexandre Oliva wrote:
>> This was based on an interpretation that strcpy (and memcpy, and
>> compiler-inlined versions thereof) could not write garbage in the
>> destination before writing the intended values, because this would be a
>> deviation from the specification, and it could be observed by an
>> asynchronous signal handler.
> Which specification do you mean? glibc or the C standard?
I meant standard C.
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer