From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#46709: 28.0.50; Emacs crash in gnutls_handshake Date: Wed, 24 Feb 2021 18:08:33 +0100 Message-ID: <87o8g95r72.fsf@gmail.com> References: <87czwsc5mz.fsf@gmail.com> <87a6rt76ch.fsf@gnus.org> 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="30292"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46709@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 24 18:13:21 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 1lExiy-0007mT-UZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Feb 2021 18:13:20 +0100 Original-Received: from localhost ([::1]:57826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lExix-0007zs-VN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Feb 2021 12:13:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lExeo-0003zT-Fs for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 12:09:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52494) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lExen-0001pn-OM for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 12:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lExen-0007od-K3 for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2021 12:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2021 17:09:01 +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.161418653630032 (code B ref 46709); Wed, 24 Feb 2021 17:09:01 +0000 Original-Received: (at 46709) by debbugs.gnu.org; 24 Feb 2021 17:08:56 +0000 Original-Received: from localhost ([127.0.0.1]:35807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lExeV-0007o4-Vr for submit@debbugs.gnu.org; Wed, 24 Feb 2021 12:08:56 -0500 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:38809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lExeT-0007nq-Cg for 46709@debbugs.gnu.org; Wed, 24 Feb 2021 12:08:43 -0500 Original-Received: by mail-wr1-f53.google.com with SMTP id b3so2602221wrj.5 for <46709@debbugs.gnu.org>; Wed, 24 Feb 2021 09:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=5YqERKhtnGtiXh/TfS93RXo3d5btL/wnWN5rpf77JCQ=; b=IoEwk3bYD35FWvMroCabfL99mBZDeRD8iqZRHH2gAJgQi8d2lNpCuGJ4SFr+gXFlJc tRN/nluIUZf13O8LZ6dqWa3uRoKhSTBcQcqUQo+gtfH88Bf1n0bYIyhg9nvn1QXQP4H5 wnIa5QBu+CoGujBfDoIcvGvUnwek+DOXNAgOLpZTmJSsCBk1I01GTXmaPgR3Cdd6+Ros 3vlGMR2rTtIxkrtwO++KUXd6l1nRVVlRxC2LG1Z0zc1BkX7kLEZkwi860lLvKJKJUFGT qU30Bpjd5rYFnGWpKjzBi+gsO/9A5XUIuV9gNMkdMinw93U7utZqfPw4WcS7ljeyajhD s8LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=5YqERKhtnGtiXh/TfS93RXo3d5btL/wnWN5rpf77JCQ=; b=auYD5EZeH2MOboaG7eOuPhNSR6IVy7b2w78pS+tOFCOXyrPet6u7P0aw2Qq/aC/6Nl m2rF0D+ju0sGVp6y8HItw/qH7mKtfQwFmAn6BmDwQffzE648aAdkCJfpD1IbVZlCCDvS q0D1wqEfqxX7aj9vhsdYSaPP1DBdGqd7QvtnYN96gpEXF9GGOq7JiEAx0SZwzPlwv2Ah sB29Lh39sErfrEeh0MpdxgiHm4mCgB8GNHf1vvP/lAR5WPO/Fwxxowc5DDHrJ1GfJHtB kGtTA6R7ueQHcjXSD01fmSpxlimVRKqyD0HpYH1UciPwUCNquIrqP+6jdBr8XcOg3V3H 1rTA== X-Gm-Message-State: AOAM530Cyrva1b7VVIp4cfmLQ6t1xQ/QdgTUJu5jlVgYyj4jG7AXEMfX fQSQDwShoNVT602dCTZ39/pjM1ow/8Qm8g== X-Google-Smtp-Source: ABdhPJzhH4XrQ06+98f9KEf+ns+vWzFVxmxoTzT5qM6KnxSM82vwPcwjnTNSjWcJymgNp4KD71CYUQ== X-Received: by 2002:adf:ed44:: with SMTP id u4mr3430262wro.35.1614186515154; Wed, 24 Feb 2021 09:08:35 -0800 (PST) Original-Received: from rltb (91-175-207-237.subs.proxad.net. [91.175.207.237]) by smtp.gmail.com with ESMTPSA id f17sm4128887wru.31.2021.02.24.09.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 09:08:34 -0800 (PST) In-Reply-To: <87a6rt76ch.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 24 Feb 2021 17:55:58 +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:200742 Archived-At: >>>>> On Wed, 24 Feb 2021 17:55:58 +0100, Lars Ingebrigtsen said: Lars> 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 current= ly >> check only for GNUTLS_E_INTERRUPTED, but the list of non-fatal error >> codes is more than that, so perhaps more is needed. >>=20 >> 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) >>=20 >> while ((ret =3D gnutls_handshake (state)) < 0) >> { >> + if (gnutls_error_is_fatal (ret)) >> + return emacs_gnutls_handle_error (state, ret); Lars> Yes, I think that this looks like the correct fix here. Except now the test suite fails. Back to the drawing board. Robert