This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding reentrancy information to safety notes?

On 01/01/2015 02:05 AM, Alexandre Oliva wrote:
> On Dec 31, 2014, "Carlos O'Donell" <> wrote:
>> I did not know malloc was required to be AS-safe for POSIX compliance.
> Ugh.  Sorry, my bad, it's not.  malloc's AS-safety goal seems to have
> jumped from "desirable" to "mandatory" in my mind :-(

No worries. That's why we work together.

>> See:
>> 2.4.3 Signal Actions.
>> The list of functions does not list malloc.
> Beware, that's a very old version of POSIX that you referenced above.
> What led me to realize it was the use of the term "reentrant" there ;-)

You are correct, issue 6 is old, issue 7 is the most recent, with text here:

> Anyway, the corresponding table in current POSIX fails to list malloc as
> AS-Safe just the same ;-)

So to recap:

We would complicate a user malloc implementation by forcing them to use only 
AS-safe functions.

We want to expand the list of usable functions the user can call from their
malloc without requiring it be all functions.

The tentative initial list is "all AS-Safe and SR-safe function." Where SR-safe
stands for synchronously reentrant e.g. can be reentered by the same thread, but
not from asynchronous contexts.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]