From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 6C15A1F934 for ; Tue, 25 May 2021 22:20:01 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] ipc: avoid potential stack-not-refcounted bug Date: Tue, 25 May 2021 22:20:00 +0000 Message-Id: <20210525222001.27517-2-e@80x24.org> In-Reply-To: <20210525222001.27517-1-e@80x24.org> References: <20210525222001.27517-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(-) 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 {