[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] [patch] Fix for fast unwind and tcmalloc not playi

From: Arun Sharma
Subject: Re: [Libunwind-devel] [patch] Fix for fast unwind and tcmalloc not playing well together.
Date: Thu, 20 Oct 2011 08:18:10 -0700

On Thu, Oct 20, 2011 at 2:55 AM, Lassi Tuura <address@hidden> wrote:

> Didn't test this yet, but looks very reasonable to me. I'll spin some tests on
> this with our software chain (also with Konstantin's patch for FreeBSD) next 
> week.

Looks like I dropped at least one patch in September :( Please let me
know how your testing goes.

Paul: The reason why libpthread loops over the keys multiple times
seems to be related to

"A destructor function might, however, re-associate non-NULL values to
that key or some other key"

I'm guessing that most destructors don't do this, which is why your
solution works. But if we get keys with crazy destructors which call
pthread_setspecific(), could we be in trouble again on the last

How about:

static __thread bool trace_destroy_started = false;

  trace_destroy_started = true

  if trace_destroy_started: return NULL

I also worry a bit about libpthread changing


reply via email to

[Prev in Thread] Current Thread [Next in Thread]