From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#46709: 28.0.50; Emacs crash in gnutls_handshake Date: Wed, 24 Feb 2021 17:55:58 +0100 Message-ID: <87a6rt76ch.fsf@gnus.org> References: <87czwsc5mz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38246"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 46709@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 24 17:57:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lExTP-0009oe-1z for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Feb 2021 17:57:15 +0100 Original-Received: from localhost ([::1]:54376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lExTO-00029F-4G for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Feb 2021 11:57:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lExTC-00024d-RE for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 11:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lExTC-0006cV-HN for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 11:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lExTC-0005Ne-GH for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 11:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2021 16:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46709 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46709-submit@debbugs.gnu.org id=B46709.161418576920623 (code B ref 46709); Wed, 24 Feb 2021 16:57:02 +0000 Original-Received: (at 46709) by debbugs.gnu.org; 24 Feb 2021 16:56:09 +0000 Original-Received: from localhost ([127.0.0.1]:35748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lExSL-0005MY-4n for submit@debbugs.gnu.org; Wed, 24 Feb 2021 11:56:09 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:44310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lExSK-0005M3-94 for 46709@debbugs.gnu.org; Wed, 24 Feb 2021 11:56:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+SK2pxhfdkCSeiTCOJyOjXrBaH+FjLJ4oMtWL4wyD7Y=; b=rfUtp7xvGViXFn3wsiVOWx6WdS iJkN75E+w6BkTFRp2eNOSAUkTV7Cw0Cba5eePMOelBKbx31F08GGyK9evf1RBO+HaI8jUXJIsmO0l ccVX6WLJ9AI2XnXF6WuQ5wMBXGJbjBhjG/sOAayLSXtACeDsXE6xqujWBQVh4Y7gjkR8=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lExSB-0005z6-MM; Wed, 24 Feb 2021 17:56:02 +0100 X-Now-Playing: Moor Mother & billy woods's _BRASS_: "Blak Forrest feat. Fielded" In-Reply-To: <87czwsc5mz.fsf@gmail.com> (Robert Pluim's message of "Mon, 22 Feb 2021 19:35:32 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200740 Archived-At: Robert Pluim writes: > My reading of > is that > after receiving a fatal error, we should not call gnutls_handshake > again. I=CA=BCve tested the following patch successfully. We currently > check only for GNUTLS_E_INTERRUPTED, but the list of non-fatal error > codes is more than that, so perhaps more is needed. > > diff --git a/src/gnutls.c b/src/gnutls.c > index aa245ee5c3..4d5a909db0 100644 > --- a/src/gnutls.c > +++ b/src/gnutls.c > @@ -625,6 +625,8 @@ gnutls_try_handshake (struct Lisp_Process *proc) > > while ((ret =3D gnutls_handshake (state)) < 0) > { > + if (gnutls_error_is_fatal (ret)) > + return emacs_gnutls_handle_error (state, ret); Yes, I think that this looks like the correct fix here. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no