From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter) Date: Thu, 28 Sep 2017 20:35:13 -0400 Message-ID: <8760c2fike.fsf@users.sourceforge.net> References: <87lglcn8dt.fsf@ericabrahamsen.net> <878th1i50l.fsf@ericabrahamsen.net> <87wp4lf1kq.fsf@users.sourceforge.net> <87ing4cd04.fsf@ericabrahamsen.net> <87h8vnftnx.fsf@users.sourceforge.net> <87zi9fxvnh.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1506645371 4150 195.159.176.226 (29 Sep 2017 00:36:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Sep 2017 00:36:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: 28489@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 29 02:36:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dxjHh-0000bQ-R9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Sep 2017 02:36:06 +0200 Original-Received: from localhost ([::1]:33169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxjHp-0005Y9-8i for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Sep 2017 20:36:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxjHj-0005Y4-L4 for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2017 20:36:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxjHe-0004T5-Oa for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2017 20:36:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxjHe-0004Su-KE for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2017 20:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dxjHe-0001ay-5F for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2017 20:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Sep 2017 00:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28489-submit@debbugs.gnu.org id=B28489.15066453236082 (code B ref 28489); Fri, 29 Sep 2017 00:36:02 +0000 Original-Received: (at 28489) by debbugs.gnu.org; 29 Sep 2017 00:35:23 +0000 Original-Received: from localhost ([127.0.0.1]:37316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxjH0-0001a2-KY for submit@debbugs.gnu.org; Thu, 28 Sep 2017 20:35:22 -0400 Original-Received: from mail-io0-f181.google.com ([209.85.223.181]:53920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxjGy-0001Zl-Nb for 28489@debbugs.gnu.org; Thu, 28 Sep 2017 20:35:21 -0400 Original-Received: by mail-io0-f181.google.com with SMTP id q11so228761ioe.10 for <28489@debbugs.gnu.org>; Thu, 28 Sep 2017 17:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=nUSEzeMyHpcHCwXaUSAgL00nAPfm2i9JSRTM6s1lnOQ=; b=qzE9UtZWv+O+uaYhOAhDiiW7UcwIWBMw4N17veySVIOSlqtzCnypJU0T6/0Z3fj+uw azPsXLfTrOJYHb7KkZKcF5bzT7cNyzNYx/5dmZp58PVw3bEh7ZrUQ9JMpDGxpzEcOWhq c2ZWawQCMO9SmoVsPHSxojEiXKegPrYFgVSdzp7j6Do1n913h2yO/0A0bAxZdYrrPaLz ypdVH2LAkfgg2hwh4jUPtNM0Z206M57RBtr/jJ7wwNvnqcnsIPrsjzUxIQF87YXGdjW3 4KF4RQNrh0DRmgN6yUWQgxAqrVtJSrDw/YaBu0IgmOlLjj2hv8gWgvUxm8d/uv4ZIDKV w55g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=nUSEzeMyHpcHCwXaUSAgL00nAPfm2i9JSRTM6s1lnOQ=; b=IBEW+6xrtK29Dz6Kao9R6PBhsUbeYWUKeubednWW2/adDSODrKvSXAEhYWX69hqX13 ALWv7TubMW5229aN+4hwYHQZ8RC+os/SQShGuYEeeLgiYNjdZ9i25dP49rOGs8WGBKTE s2+bS3+H6+YKZ7Qs2LwcLexicWpYv7UaAP+sS/cuCLJq+nRpy9LA8w27InqilOllC071 jHQB9GNAHWn9BlgkLcTkEV46b4+iu1/QdXPuViwbAja4vviZSEGu4R+YjU2tvEL+8bbJ qWQ2KNJVROw4tecP3ikdFJrFq3G06/b60XUTjiieM6riDbsFhamzL73GNadEO2Iy8c86 l84g== X-Gm-Message-State: AHPjjUifoPnbxIY0MeEA9504NbutETYEmmwG6sFYcPtSSgGFlBeF7Xrm oEIgbqdLBBsaVnp4Dnf5Pxgbzw== X-Google-Smtp-Source: AOwi7QDmbBfrpVIn4U5XNi5eB11x3zzS/imLiLIbCSr4Pbld3NbY70ozDYJyGgYpKHIfgJJzbdL6zw== X-Received: by 10.107.137.74 with SMTP id l71mr10266333iod.186.1506645314910; Thu, 28 Sep 2017 17:35:14 -0700 (PDT) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id j93sm1243011iod.65.2017.09.28.17.35.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Sep 2017 17:35:14 -0700 (PDT) In-Reply-To: <87zi9fxvnh.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 27 Sep 2017 22:02:58 -0700") 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" Xref: news.gmane.org gmane.emacs.bugs:137555 Archived-At: Eric Abrahamsen writes: > Essentially it is validating twice, both before and after the actual > objects are created. I don't have a very firm grasp of all the code > involved, but in principle I would prefer just to eval all object > construction forms regardless, and then let it blow up at "real" > validation time -- it was going to blow up anyway. Hmm, yeah, it does look the prevalidation is mostly redundant work. The docstring of eieio-persistent-convert-list-to-object mentions malicious code, perhaps the prevalidation should be with unsafep (i.e., don't try to typecheck anything, just make sure it's safe to eval). This would require that object constructors could be marked safe though. > But again, my patch or something like it would be enough to get > everything working as advertised. Right. I think your patch is probably fine, though a few tests might a good idea too. >>> I don't think the tabs were my fault! What's Emacs policy on this? >> >> I believe the policy is that new code should use spaces (although >> sometimes people ignore this, it's not a big deal), but don't touch >> lines just for the sake of changing the whitespace. > > Good to know, thanks. In lines of code I've added, indentation will be > done with spaces, but I suppose that's okay? Yes, sorry for being unclear, that's what I meant. "new code" was supposed to refer to lines that are added (or modified), as opposed to "old code" being the unchanged lines.