On Wed, Mar 5, 2014 at 1:25 AM, Richard Biener
<richard.guent...@gmail.com> wrote:
> On Wed, Mar 5, 2014 at 4:34 AM, Ian Lance Taylor <i...@google.com> wrote:
>> The GNU glibc qsort function will call malloc in some cases.  That makes
>> it unsuitable for libbacktrace, which is intended to work when called
>> from a signal handler.  This patch changes libbacktrace to use an
>> internal qsort function.
>>
>> I'm posting this for comments in case anybody sees anything wrong with
>> the implementation.  I'll commit it in a day or two if I don't hear
>> anything.
>>
>> Bootstrapped and ran libbacktrace and Go tests on
>> x86_64-unknown-linux-gnu.
>
> Doesn't it make sense to put this into libiberty and call it
> sigsafe_qsort or qsort_sigsafe? (not sure if there is a standard
> suffix/prefix for signal-safe variants of functions like _r is
> for thread-safe variants)
My main hesitation is that libbacktrace and libgo do not currently use
libiberty.  In general our target libraries do not use libiberty, and
using libiberty exposes them to licensing issues since libiberty
contains straight GPL code without the runtime exception.

Ian

Reply via email to