File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ * Fix a possible double-free issue when GC triggers inside `_msgpack_rmem_alloc2`.
12* `Unpacker#feed` now always directly read in provided strings instead of copying content in its buffer.
23* `Unpacker#feed` is now an alias of `Unpacker#feed_reference`.
34* Implement `Factory::Pool#unpacker` and `Factory::Pool#packer` to allow for more precise serialization.
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ void* _msgpack_rmem_alloc2(msgpack_rmem_t* pm)
6868 /* move head to array */
6969 * c = pm -> head ;
7070
71+ pm -> head .pages = NULL ; /* make sure we don't point to another chunk's pages in case xmalloc triggers GC */
7172 pm -> head .mask = 0xffffffff & (~1 ); /* "& (~1)" means first chunk is already allocated */
7273 pm -> head .pages = xmalloc (MSGPACK_RMEM_PAGE_SIZE * 32 );
7374
You can’t perform that action at this time.
0 commit comments