problem with the arenas_tsd key

Rich Prohaska prohaska at tokutek.com
Tue Oct 18 13:49:21 PDT 2011


The value associated with arenas_tsd is set before the key is created.  This
can corrupt some other library that is using key 0.  Attached is a program
that demonstrates the problem and a proposed fix to the problem.  We are not
experts on jemalloc internals, and we would appreciate any feedback about
the fix.

Run "make check_arena_key" to reproduce the crash.

See jemalloc.c for the fix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20111018/1ce797c6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_arena_key.c
Type: text/x-csrc
Size: 683 bytes
Desc: not available
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20111018/1ce797c6/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 552 bytes
Desc: not available
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20111018/1ce797c6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jemalloc.c
Type: text/x-csrc
Size: 41018 bytes
Desc: not available
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20111018/1ce797c6/attachment-0001.c>


More information about the jemalloc-discuss mailing list