unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Andrea Corallo <akrl@sdf.org>
Cc: 46670@debbugs.gnu.org, Mauricio Collares <mauricio@collares.org>
Subject: bug#46670: 28.0.50; [feature/native-comp] possible miscompilation affecting lsp-mode
Date: Thu, 25 Feb 2021 12:41:42 +0000	[thread overview]
Message-ID: <CAOqdjBd=_2Sy2bHU9pkoVGNgVk2Am7kvF_PGBB8uF+osotRLpg@mail.gmail.com> (raw)
In-Reply-To: <xjfsg5lixun.fsf@sdf.org>

Hello Andrea,

On Wed, Feb 24, 2021 at 10:06 AM Andrea Corallo <akrl@sdf.org> wrote:
>
> Pip Cet <pipcet@gmail.com> writes:
>
> > On Wed, Feb 24, 2021 at 9:42 AM Andrea Corallo <akrl@sdf.org> wrote:
> >> (assume #(mvar 22593374 2 (not (integer 3 3))) (not #(mvar 22590962 2 (integer 3 3))))
> >
> > If that doesn't mean "the variable in slot 2 is not equal to the
> > variable in slot 2", we desperately need to work on the LIMPLE
> > syntax...
>
> Honestly I think would be fair from your side to first try to understand
> how it works before criticizing it or submitting untested patches.

I thought I'd give this some time to let tempers cool.

I appreciate your criticism (but not the ad hominem), and I will take
it into account when communicating with you.

I'm sorry you mistook the patches I sent as being submitted for
immediate inclusion: so far, that hasn't been my intention. They're
meant to demonstrate ideas and indicate which area I'm working on.
I'll try to make that clear in future.

As for the immediate issue: LIMPLE, of course, is yours to define as
you wish. If, however, you don't define it, either in documentation or
by providing code that handles it correctly, you can hardly blame me
for considering it a bug if the obvious interpretation causes subtle,
unnecessary problems.

To pick an example at random, after your recent changes, I assumed the
following would be valid LIMPLE (pseudocode):

(set (mvar :slot -1) (mvar :slot 0))

but it's not, because negatively-indexed "temporary variables" aren't
actually mapped to variables in the C backend (instead, they generate
out-of-bounds array accesses, usually a SIGSEGV).

If that is intentional, we need to document it (we also need to assert
rather than segfault when someone disregards this capricious rule) .
If it is unintentional, and I believe it is, do you really want me not
to point it out?

Lastly, on the subject of testing, I believe compiler correctness is
fundamentally more important than not missing any optimizations. Most
of your tests cover the latter aspect.  Maybe we could express that in
the tests somehow, by using another tag?

> Indeed I'm happy to answer as I've explained what this means in my
> previous mail.

I'm not sure I understand that sentence. I'll try looking through
previous messages from you for an explanation, I guess?

> And I've to say, not everything that's not working as you'd expect at
> first glance is broken by definition, this is just not a very good
> collaborative approach :/

My expectations are based, in part, on having read through your code,
including the comments. That's hardly "at first glance".

If I still misunderstand things fundamentally, it's possible, even
likely, that we need to add more documentation (and correct existing
documentation) explaining, for example, that meta-variables introduced
in an assume do not have a value and that their slot number is
meaningless. Once we've done that, we can discuss why I think that
would be a very bad design choice.

Regards
Pip





  reply	other threads:[~2021-02-25 12:41 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 [this message]
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
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='CAOqdjBd=_2Sy2bHU9pkoVGNgVk2Am7kvF_PGBB8uF+osotRLpg@mail.gmail.com' \
    --to=pipcet@gmail.com \
    --cc=46670@debbugs.gnu.org \
    --cc=akrl@sdf.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).