From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22737: 25.1; Finalizer should be optional in dynamic modules Date: Fri, 26 Feb 2016 23:33:07 +0200 Message-ID: <83twkvcg30.fsf@gnu.org> References: <87a8mxsn2g.fsf@oracle.com> <83lh6hrqm4.fsf@gnu.org> <83fuwiixnm.fsf@gnu.org> <83vb5bco99.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1456522462 26715 80.91.229.3 (26 Feb 2016 21:34:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2016 21:34:22 +0000 (UTC) Cc: 22737@debbugs.gnu.org To: Jess Balint , Daniel Colascione , John Wiegley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 26 22:34:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aZQ1b-0004ku-4r for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 22:34:11 +0100 Original-Received: from localhost ([::1]:52188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZQ1a-0007WQ-E0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 16:34:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZQ1W-0007WH-F9 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 16:34:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZQ1S-0005Nd-CD for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 16:34:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZQ1S-0005NV-8g for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 16:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aZQ1S-0008QD-2N for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 16:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2016 21:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22737-submit@debbugs.gnu.org id=B22737.145652242132347 (code B ref 22737); Fri, 26 Feb 2016 21:34:02 +0000 Original-Received: (at 22737) by debbugs.gnu.org; 26 Feb 2016 21:33:41 +0000 Original-Received: from localhost ([127.0.0.1]:47926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZQ16-0008Pe-NW for submit@debbugs.gnu.org; Fri, 26 Feb 2016 16:33:40 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54516) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZQ15-0008PS-4i for 22737@debbugs.gnu.org; Fri, 26 Feb 2016 16:33:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZQ0z-0004mh-18 for 22737@debbugs.gnu.org; Fri, 26 Feb 2016 16:33:33 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZQ0u-0004lL-Dr; Fri, 26 Feb 2016 16:33:28 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3541 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aZQ0t-0006aP-Kj; Fri, 26 Feb 2016 16:33:28 -0500 In-reply-to: (message from Jess Balint on Fri, 26 Feb 2016 12:53:20 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113912 Archived-At: > Date: Fri, 26 Feb 2016 12:53:20 -0600 > From: Jess Balint > Cc: 22737@debbugs.gnu.org > > What will happen if such objects are exposed to Lisp, copied or > assigned to other Lisp variables, etc.? Won't this cause all kinds of > trouble, like modifying one such object will magically modify several > others, which share its storage? > > This is how C code works. If you return a pointer from a function, you may have to free that pointer yourself or > you may not. You may get the same pointer back from multiple calls to the same function. If you use the > pointer after it's been freed, it's your problem. You need to agree with the owner of the pointer how the > memory is to be managed. With pointers, modifications to the underlying data are visible by all who have a > pointer to the data. I wouldn't call this "magically modifying others". In C, yes. But we are talking about Lisp objects here. Am I the only one who is uneasy with supporting such Lisp objects? If so, I will shut up and install the changes. Daniel, John, what's your opinion on this? Thanks.