From 3060d78b4183f3e985fb7ff8864949de990f2610 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 25 May 2021 22:20:00 +0000 Subject: 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. --- lib/PublicInbox/IPC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 { -- cgit v1.2.3-24-ge0c7