From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: Re: Module support: No environment in pointer release function Date: Mon, 27 Feb 2017 12:31:33 +0800 Message-ID: References: <87poismx76.fsf@hochschule-trier.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114402c0eae23705497b8da3 X-Trace: blaine.gmane.org 1488169932 8046 195.159.176.226 (27 Feb 2017 04:32:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2017 04:32:12 +0000 (UTC) Cc: Andreas Politz , emacs-devel To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 27 05:32:07 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciCyk-0001SZ-I1 for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2017 05:32:06 +0100 Original-Received: from localhost ([::1]:50250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciCyq-00017X-HG for ged-emacs-devel@m.gmane.org; Sun, 26 Feb 2017 23:32:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciCyH-00017S-7P for emacs-devel@gnu.org; Sun, 26 Feb 2017 23:31:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciCyG-0000hB-Au for emacs-devel@gnu.org; Sun, 26 Feb 2017 23:31:37 -0500 Original-Received: from mail-ua0-x231.google.com ([2607:f8b0:400c:c08::231]:35422) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciCyG-0000gr-6c for emacs-devel@gnu.org; Sun, 26 Feb 2017 23:31:36 -0500 Original-Received: by mail-ua0-x231.google.com with SMTP id 40so44275398uau.2 for ; Sun, 26 Feb 2017 20:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ck5bSiZz/QJrE0L9TOCKTdC6WVvlN80DyOBzq0AEja0=; b=TufdVMbJZFvxzmHrwwH0Ofr3Pl78+fH/F4lGMKAZOs9UCXAA5kp+f9MhNNSIYluS8x tOX12bYOSgLXIlpDLu+akY2xlE7hOpgmrcB/fm+yXPS9Po1Ez/o7BzUvEF8dHhFJYCY2 9EPKLu4+ofEcD3w3lhHKP2mw7j3R0ux7iWeQQG5jBm5yXbPsNi1ysqHi9XW5sY+olfir UOYHU2vOdM5JMXxhhegRLnoVQCmAw9axFwtdhaz9Wz96T2UCw94CfEbOzXtOwnM+2691 IEFKRGrQUXip5Y2AiXA98IxivayiDFRzq9vxMeto+evrUKB93DaHmpnucWu20Pppa6yV Akrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ck5bSiZz/QJrE0L9TOCKTdC6WVvlN80DyOBzq0AEja0=; b=gDkqEBZlTBYya+P3EjrlBY0HUbou8Rl/0FKbm0uSSwNvZBGIgFQ5mk/Ot5mkXIC5r6 jyNxNw5SeVD/7CsxLOQsTQ+eLmwJHUsOu+Ots/ijnGZ6poBy+3VJG+lDoM2jG6tiWz66 nTrjDZJdI7vxBtfpg7VhvEjT2GF+rkTz2yo2n8xBHpIz+rrVrUfjWcoJim4zfitmZpTY mlc+MuCJTbQTSScbpYdPH2x/yuXqhbkr1Y8mL7VVf/F1MEdv2mL7zlNWzyM8jlBJF+S0 FOJfQjRl0ERXtzs+Gl4LJWey0+7jJu2IKRgNF487aRgXIhORg5nmXrcc1HXsg25Ntsjq q/uA== X-Gm-Message-State: AMke39lFei1gfgVCF0bNPPXVFKhp0MtWxmjFWTjqXEcvK8geWqwekWbXdgCceqoXbnRkEZRCtgrtznBSaJTaVg== X-Received: by 10.31.52.193 with SMTP id b184mr5996380vka.156.1488169894336; Sun, 26 Feb 2017 20:31:34 -0800 (PST) Original-Received: by 10.103.119.5 with HTTP; Sun, 26 Feb 2017 20:31:33 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c08::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212618 Archived-At: --001a114402c0eae23705497b8da3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 27 February 2017 at 00:23, Philipp Stephani wrote: > > Elias M=C3=A5rtenson schrieb am Fr., 10. Feb. 2017 um > 06:21 Uhr: > > Right now I simply call abort() if there is an error. Excessive, I know, >> but at least I know when there is a problem and the stack trace gives me >> all the answers I need. >> >> I'm not sure I should keep the abort() in the final version though. >> > > Probably not. You should either log (on stderr) and ignore the error, or > not call gss_release_name (or any other function that can fail) in a > finalizer. > Just like they Java counterpart, finalizers can't fail. There's also no > guarantee that they ever be called, or when they are called, so you > shouldn't use them to implement cleanup that has to be deterministic or c= an > fail. > Thank you. That seems reasonable, and I will do this. Regards, Elias --001a114402c0eae23705497b8da3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 2= 7 February 2017 at 00:23, Philipp Stephani <p.stephani2@gmail.com&= gt; wrote:

Elias M=C3=A5rte= nson <lokedhs@gma= il.com> schrieb am Fr., 10. Feb. 2017 um 06:21=C2=A0Uhr:
=C2=A0
Right= now I simply call abort() if there is an error. Excessive, I know, but at = least I know when there is a problem and the stack trace gives me all the a= nswers I need.

I'm not su= re I should keep the abort() in the final version though.
=

Probably not. You should eith= er log (on stderr) and ignore the error, or not call gss_release_name (or a= ny other function that can fail) in a finalizer.
Just like they J= ava counterpart, finalizers can't fail. There's also no guarantee t= hat they ever be called, or when they are called, so you shouldn't use = them to implement cleanup that has to be deterministic or can fail.

Thank you. That see= ms reasonable, and I will do this.

Regards,
Elias=
--001a114402c0eae23705497b8da3--