This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
threads::shared: alloc arenas with correct context
authorDavid Mitchell <davem@iabyn.com>
Fri, 14 Apr 2017 09:51:56 +0000 (10:51 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 14 Apr 2017 10:14:44 +0000 (11:14 +0100)
commitdefb77b559d3c08f94e6db14937a91a4cac8e204
tree379eee65926f04110dd1f78cc17f23c77acc787c
parentb28683c9b5d157bf72cd93c7d257ed5b39dad090
threads::shared: alloc arenas with correct context

RT #131124

In a couple of places in shared.xs, it calls sv_newmortal() with
a perl context different from that currently set by PERL_SET_CONTEXT().
If sv_newmortal() happens to trigger the malloc of a new SV HEAD arena,
then under PERL_TRACK_MEMPOOL, this will cause panics when the arena is
freed or realloced.
dist/threads-shared/lib/threads/shared.pm
dist/threads-shared/shared.xs
dist/threads-shared/t/object2.t