From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector objects Date: Thu, 28 May 2020 06:31:44 +0000 Message-ID: References: <83zha8cgpi.fsf@gnu.org> <83h7w5xvfa.fsf@gnu.org> <83y2phwb9x.fsf@gnu.org> <83r1v9w9vi.fsf@gnu.org> <83mu5xw50d.fsf@gnu.org> <83k110wxte.fsf@gnu.org> <4bab5f55-95fe-cf34-e490-1d4319728395@cs.ucla.edu> <837dwyvi74.fsf@gnu.org> <1484f569-c260-9fb0-bfe1-67897de289d3@cs.ucla.edu> <83blm9tn4j.fsf@gnu.org> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@cs.ucla.edu> <753eed58-287b-1c47-deef-0e343bca8e69@cs.ucla.edu> <1ce49934-ee4c-78b5-20ff-83f281aed4ee@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="115669"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41321@debbugs.gnu.org, Stefan Monnier To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 28 08:33:09 2020 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 1jeC6H-000TyK-Q6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 May 2020 08:33:09 +0200 Original-Received: from localhost ([::1]:39108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeC6G-0002xI-Nd for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 May 2020 02:33:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeC6A-0002x8-OV for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 02:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39223) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jeC6A-0004V0-FS for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 02:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jeC6A-0002dp-DY for bug-gnu-emacs@gnu.org; Thu, 28 May 2020 02:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 May 2020 06:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41321 X-GNU-PR-Package: emacs Original-Received: via spool by 41321-submit@debbugs.gnu.org id=B41321.159064754810110 (code B ref 41321); Thu, 28 May 2020 06:33:02 +0000 Original-Received: (at 41321) by debbugs.gnu.org; 28 May 2020 06:32:28 +0000 Original-Received: from localhost ([127.0.0.1]:50769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeC5c-0002d0-G7 for submit@debbugs.gnu.org; Thu, 28 May 2020 02:32:28 -0400 Original-Received: from mail-oi1-f179.google.com ([209.85.167.179]:44524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeC5b-0002cm-8x for 41321@debbugs.gnu.org; Thu, 28 May 2020 02:32:27 -0400 Original-Received: by mail-oi1-f179.google.com with SMTP id y85so23920387oie.11 for <41321@debbugs.gnu.org>; Wed, 27 May 2020 23:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=isP7gF9KQ1RoHAcJvg+JAS4ObIP4euAgWh5O0PSoCHU=; b=N0Pw27MJpBtY5fAKDhogZPJmBWk81rvpKvbQFeNCnYs85uq6sQR4c8SniO6P6Be9pm C7tegCvYho68VcM2dwpm7zmtlZOAHG1/cSo59YnBj3CrxjLWcRpt6qalwFNKj/Coh41A 497b9M99T9INm7ROVwaVd1CpCcl4PxqxzOv0+UF8GL2Jx8l+z1OqfujEhSz3MUraPpnu h5wlQNqw3if4ULs8UOHItbfx2vx+zddKtlHLOUH2eLMzMRQDtPFVh1O8OLUA2YUb795s 8ilTyTgfIgXikQFlsZT+juKmLhOmSVZDW6DkWQjjTt8puYZjEI5ytC+N0nm4igJvWq24 xrug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=isP7gF9KQ1RoHAcJvg+JAS4ObIP4euAgWh5O0PSoCHU=; b=G3h7xy0u7WYFQZ7Fgzuil4GMsbqXr8/LcF2/qKPNmBzjRJWYdn7kp+OIcO0JK9LCT2 DCLJZb0GZOcseBItv0eVYlzc5PwFZJs5j44FnJG+yHjJCCdSDB+bBzH3vG2Qntxlti3L KNPlYsgnjKFcG4GZ/HVULZ03UkRqmxnNNaOWdoSsUv+W6xxDF5DF67LTmZEohl+OddMR SkPSEQnJEi/ek1vU2NWr37lN89sTsle8a3xvwb0zZOwAK6cOVQktsRxLaB4IP2qrFI4a lddH0gwG19RxgNxDGnWNjDEfr/Yggk53Ue9fkBtQAnqRAk8eaNcj48Wip79EiaLqeY8q NwRQ== X-Gm-Message-State: AOAM533i6/9epMXHArN3k1jq47ZnvHhvHd9Ql7Y/R+M1C6K9CpfhlsI6 Lxg4MlSMrsdJRLqm7Vf6tjNg9FnYC7smcEqA66s= X-Google-Smtp-Source: ABdhPJxZMEz8ZQQH3ZdxTh77hSxxAyTtKy4YeoRM3MKkyVXmFM7Y1IS2aYU8szQoHhTrRQragfRL+n1GArKLFhsNqoM= X-Received: by 2002:aca:c6d3:: with SMTP id w202mr1278892oif.44.1590647541226; Wed, 27 May 2020 23:32:21 -0700 (PDT) In-Reply-To: <1ce49934-ee4c-78b5-20ff-83f281aed4ee@cs.ucla.edu> 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:181125 Archived-At: On Thu, May 28, 2020 at 1:21 AM Paul Eggert wrote: > On 5/27/20 11:56 AM, Pip Cet wrote: > > > So, at the very least, we need to always keep the immediately > > preceding object alive if we go that way. > > Yes, I'm assuming that. I'll check that the code is doing that (if it isn't > doing it already). Okay, that makes sense. > > that's a significant overhead because it > > usually means two objects are being kept alive by one reference. > > For Lisp_Objects with nonzero tags this shouldn't be an issue, since the tags > mean the pointers won't tie down two objects. On USE_LSB_TAG systems, you're correct. > I'll measure how much overhead is involved in my usual 'make compile-always' > benchmark. If it's not that much then we'll be OK. I'm hoping that's the case. > If not, there are some more measures we can take. I suspect that garbage collection is only slowed down significantly when there are large objects on the stack; that happens when GC happens during redisplay, for example. (All the more reason to make the struct it stack heap-allocated as I'd proposed). > > With prefetch instructions, it's quite likely the compiler concludes > > it's easiest to prefetch something 256 bytes ahead of where it > > actually makes the access, then make the actual access relative to > > that address... > > I wouldn't worry about that; it's so unlikely that it's not a practical concern. Fingers crossed. > "Some C optimizers may lose the last undisguised pointer to a memory object as a > consequence of clever optimizations. This has almost never been observed in > practice." As I understand it, the times "in > practice" that Hans-J. Boehm was talking about were for C code deliberately > designed to fool the compiler / GC combination. > > I think it unlikely that a modern compiler would break all the code out there > that uses conservative GC. > > (Besides, if that stuff really were of practical concern we'd have to give up on > conservative GC entirely. :-) I hope you're right, in that compilers will support GC better before they move on to clever optimizations that break it :-) (I'm not sure what the current state is of "real" GC support in LLVM; I'm pretty sure not much has happened in GCC.)