This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #134035) ensure sv_gets() handles a signal handler modifying sv
authorTony Cook <tony@develop-help.com>
Wed, 17 Apr 2019 05:45:15 +0000 (15:45 +1000)
committerTony Cook <tony@develop-help.com>
Thu, 13 Jun 2019 05:43:25 +0000 (15:43 +1000)
commit368ac47cccd4ffca6e83a26289c152a32c2ea385
tree83b475001d88fbe3c08ccb38350e3f4f4fec9f08
parent0367cc1abaafd2271368270db2bea24e8c7a5945
(perl #134035) ensure sv_gets() handles a signal handler modifying sv

At a very basic level at least.

In the ticket cases, a signal handler is modifying (and reallocating
PVX) the sv, while sv_gets() retained a pointer to the inside of the
SV.

This still has some problems, like if the signal handler ends up
shortening SV, there may be old data left between the old position
and the new position, but I think that's a case of user error.
sv.c