unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 46670@debbugs.gnu.org, mauricio@collares.org,
	Andrea Corallo <akrl@sdf.org>
Subject: bug#46670: 28.0.50; [feature/native-comp] possible miscompilation affecting lsp-mode
Date: Sat, 27 Feb 2021 09:39:50 +0000	[thread overview]
Message-ID: <CAOqdjBfNipDaYncPROz7BGtMy5G=sQwCgpQHO3rihbsZ5V2g2A@mail.gmail.com> (raw)
In-Reply-To: <835z2eosqn.fsf@gnu.org>

On Sat, Feb 27, 2021 at 7:49 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Pip Cet <pipcet@gmail.com>
> > Date: Sat, 27 Feb 2021 05:06:43 +0000
> > Cc: Andrea Corallo <akrl@sdf.org>, 46670@debbugs.gnu.org, mauricio@collares.org
> >
> > > AFAICT, the principles proposed by Andrea are just common sense, and
> > > definitely not a drastic change from our existing practices.
> >
> > Let me try to explain a situation in which I don't think they work
> > very well, and which may or may not be similar to the situation we're
> > actually in:
[...]
> > How, assuming for the moment that the "strange" in (1) actually means
> > "buggy", are we supposed to fix this?
>
> I don't see any evidence yet that this needs to be fixed.
> Without
> such evidence, the whole discussion is about a moot point.

Quite the reverse: if we make rules saying such bug reports are to be
ignored, as Andrea suggested, actually reporting the bug is moot. It's
the rules I objected to in the previous mail, not the legitimate
requirement for further elaboration on my part before anyone else is
convinced there's a bug.

> Maybe I don't understand the issue well enough?

I'm certainly in no position to say I understand it perfectly and I
can explain it to you.

The problem is that "assume" insns do not have semantics yet: they
don't behave as you would expect "assume" to behave; they aren't
documented to behave differently; and there is no code (yet) which
uses them in ways that would make clear what they are supposed to
mean.

There is, I am convinced, no consistent way of _giving_ them semantics
without changing the assume insns we emit, first. For example, we're
emitting

<#(mvar Y :slot 1) is live>
(assume #(mvar X :slot 1) (not #(mvar Y :slot 1)))
<#(mvar X :slot 1) is live>

That's paradoxical on the face of it, as the two mvars refer to the
same variable. If there is a consistent nontrivial interpretation of
"assume" that would work in this case, I'm unaware of it.

Note that "assume" as we know and love it has very simple semantics:
it expresses a condition which, at runtime, is known to be satisfied.
You can convert an assume into a runtime test, and if it fails, the
assume was wrong in the first place.

That's not the case here, since the assume above would translate into

(assert (not (eq #(mvar X :slot 1) #(mvar Y :slot 1))))

which, obviously, never succeeds.

The fix is as trivial as not saying that the mvar X lives in slot 1.
There's actually a different slot that it does live in, and my patch
would have used that slot instead. It would have been equally valid
simply not to give it a slot at all, by whichever mechanism is
appropriate for that (I would have left the slot slot nil, but if
Andrea prefers assigning a negative "virtual" slot number to the mvar,
that's a valid choice as well).

There's a very similar issue with the other branch of the "if", as it turns out.

All of this was sufficient for me to write Andrea asking whether there
was an issue (leaving out what I thought would be, to him, the tedious
trivialities of the lines above), or whether I was confused. I could
certainly have handled the ensuing exchange better, and I'll try to do
so in the future. However, the categorical instalment of new rules
disallowing the presentation of patches or bug reports for all bugs
outside a very narrow class would prevent that entirely.

Pip





  reply	other threads:[~2021-02-27  9:39 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-21  0:12 bug#46670: 28.0.50; [feature/native-comp] possible miscompilation affecting lsp-mode Mauricio Collares
2021-02-21 11:51 ` Pip Cet
2021-02-21 11:56   ` Pip Cet
2021-02-21 21:03     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-21 22:46       ` Pip Cet
2021-02-22  9:37         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-22 10:04           ` Pip Cet
2021-02-22 10:25             ` Pip Cet
2021-02-22 11:23               ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-22 12:11                 ` Pip Cet
2021-02-22 13:12                   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-23  7:59                     ` Pip Cet
2021-02-23  9:04                       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-23 23:26                         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-24  2:10                           ` Mauricio Collares
2021-02-24  8:22                             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-23 19:09                     ` Pip Cet
2021-02-23 23:36                       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-24  4:31                         ` Pip Cet
2021-02-24  9:04                           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-24  9:28                             ` Pip Cet
2021-02-24  9:42                               ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-24  9:46                                 ` Pip Cet
2021-02-24 10:06                                   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-25 12:41                                     ` Pip Cet
2021-02-25 14:58                                       ` Eli Zaretskii
2021-02-25 15:14                                         ` Pip Cet
2021-02-25 15:31                                           ` Eli Zaretskii
2021-02-25 16:56                                       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-25 20:59                                         ` Pip Cet
2021-02-26 19:33                                           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-26 20:30                                             ` Pip Cet
2021-02-26 20:44                                               ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-26 20:11                                           ` Eli Zaretskii
2021-02-26 20:32                                             ` Pip Cet
2021-02-27  5:06                                             ` Pip Cet
2021-02-27  7:49                                               ` Eli Zaretskii
2021-02-27  9:39                                                 ` Pip Cet [this message]
2021-02-27 10:24                                                   ` Eli Zaretskii
2021-02-27 12:39                                                     ` Pip Cet
2021-02-27 13:30                                                       ` Eli Zaretskii
2021-02-27 17:15                                                         ` Pip Cet
2021-02-27 18:40                                                           ` Eli Zaretskii
2021-02-28  8:14                                                             ` Pip Cet
2021-03-01  5:24                                                               ` Richard Stallman
2021-03-01  6:40                                                                 ` Pip Cet
2021-02-22 11:16             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-23  9:07               ` Pip Cet
2021-02-23 22:55                 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-24  7:00                   ` Pip Cet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOqdjBfNipDaYncPROz7BGtMy5G=sQwCgpQHO3rihbsZ5V2g2A@mail.gmail.com' \
    --to=pipcet@gmail.com \
    --cc=46670@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    --cc=mauricio@collares.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).