From: Eric Wong <e@80x24.org> Date: Tue, 25 May 2021 22:20:00 +0000 (+0000) Subject: ipc: avoid potential stack-not-refcounted bug X-Git-Tag: v1.7.0~640 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=3060d78b4183f3e985fb7ff8864949de990f2610;p=public-inbox.git ipc: avoid potential stack-not-refcounted bug This fixes a potential problem with Carp::longmess firing somewhere deeper in the stack. This is not a known problem at this time, but something I noticed while chasing something else. --- diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm index cf3723f7..24237773 100644 --- a/lib/PublicInbox/IPC.pm +++ b/lib/PublicInbox/IPC.pm @@ -251,7 +251,7 @@ sub wq_worker_loop ($) { sub do_sock_stream { # via wq_io_do, for big requests my ($self, $len) = @_; - recv_and_run($self, delete $self->{0}, $len, 1); + recv_and_run($self, my $s2 = delete $self->{0}, $len, 1); } sub wq_broadcast {