Question about pthread_getspecific with jemalloc
Rich Prohaska
prohaska at tokutek.com
Sat Oct 29 20:54:19 PDT 2011
there is a bug in jemalloc-2.2.1 on jemalloc.c line 807 in which key 0 is
set before the key is created on line 813. this may be the problem you are
seeing. i moved the key create above the key use on my version of jemalloc.
rich prohaska
tokutek
On Sat, Oct 29, 2011 at 4:15 PM, Kristen Eisenberg <
kristen.eisenberg at yahoo.com> wrote:
> link with jemalloc. What happens is, after calling malloc(), the
> value of one of my keys seems to change out from under me. Here is a
> small example that demonstrates this:
> http://itsapad.appspot.com/fancy/6. I am using jemalloc-2.2.1 on
> Linux. If I compile the example with gcc (ver 4.4.3) using the
> following command: 'gcc -lpthread main.c' then both calls to
> pthread_getspecific return a NULL pointer as expected. When I link
> with jemalloc, however, ('gcc -ljemalloc -lpthread main.c') then the
> second call to pthread_getspecific returns some non-NULL value. Is
> this a known bug or am I doing something wrong?
>
> Kristen Eisenberg
> Billige Flüge
> Marketing GmbH
> Emanuelstr. 3,
> 10317 Berlin
> Deutschland
> Telefon: +49 (33)
> 5310967
> Email:
> utebachmeier at
> gmail.com
> Site:
> http://flug.airego.de - Billige Flüge vergleichen
>
> _______________________________________________
> jemalloc-discuss mailing list
> jemalloc-discuss at canonware.com
> http://www.canonware.com/mailman/listinfo/jemalloc-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20111029/e3242611/attachment.html>
More information about the jemalloc-discuss
mailing list