]> granicus.if.org Git - gc/commit
Fix data race when getting object size in explicitly-typed allocators
authorIvan Maidanski <ivmai@mail.ru>
Fri, 10 Nov 2017 17:07:16 +0000 (20:07 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 15 Dec 2017 17:47:17 +0000 (20:47 +0300)
commiteb33bda5ce238e834482ab7ac3d70f247159650f
tree962b9d462ee57557b2539a57b8b92ee536e3ff4b
parent2f1b8e8b7eff246e21e472f6c84ae7265f997105
Fix data race when getting object size in explicitly-typed allocators

* typd_mlc.c (COMPLEX): Reformat comment.
* typd_mlc.c (GC_malloc_explicitly_typed,
GC_malloc_explicitly_typed_ignore_off_page, GC_calloc_explicitly_typed):
Always use BYTES_TO_GRANULES(GC_size(op)) instead of GC_size_map[lb] to
determine size of the allocated object in granules (because the value
of GC_size_map[lb] might be updated by another thread since the value
use in GC_malloc_kind); add comment.
typd_mlc.c