This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
recv: reset stack when returning undef
authorDavid Mitchell <davem@iabyn.com>
Thu, 15 Jun 2017 10:43:42 +0000 (11:43 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 22 Jun 2017 12:37:51 +0000 (13:37 +0100)
commit78e69e607cdc9eed625a2bb8a98fbeadf0365bad
tree7352c8c6ed9d6e317d2a5293219b4f21d80f9659
parentb7effc98210707765c69fb0a0b9b695d5e7483ce
recv: reset stack when returning undef

When recv() detects an error, it returns undef: but it was failing to pop
its args off the stack first. So in list context it returned both its
original args and undef. It was also then not extending the stack to push
the undef.

After this commit  it resets SP to the base of its args list first,
like the other ops already do which share the Perl_pp_systread() function
body.
pp_sys.c