unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46847: 28.0.50; [native-comp] assume pseudo-insns should be verified
@ 2021-03-01 13:06 Pip Cet
  2021-03-01 20:12 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-03-05 16:09 ` Pip Cet
  0 siblings, 2 replies; 11+ messages in thread
From: Pip Cet @ 2021-03-01 13:06 UTC (permalink / raw)
  To: 46847

This is a wishlist item for the native-comp branch, though I consider
the feature in question to be so essential that its absence also
qualifies as a bug.

The native-comp branch is emitting assume pseudo-insns. Those come in
various forms, but their interpretation is clear: they express
conditions which are meant to hold at runtime, and which the compiler
may use to optimize code.

I would like to add an optional compiler pass which asserts that the
conditions are actually true at runtime. This is a basic safeguard
that any assume() mechanism should have, and it's perfectly equivalent
to the way eassume() becomes eassert() in debug builds of Emacs.

Unfortunately, it turns out that while adding the compiler pass is
easy, there are many failures because the assume pseudo-insns emitted
at present are inconsistent or plain wrong. Some of these wrong
assumes result in reproducible Lisp-to-native-code bugs today; others
will not; for still others, we're not sure.

For example, the four following bugs became a problem only because of
a lack of this safeguard: bug#46843 (both bugs), bug#46812, bug#46670.

Merging native-comp without such a safeguard would, I am convinced,
introduce preventable, tricky, unnecessary bugs into the Emacs master
branch.  We shouldn't do that.

Pip





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-20 14:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 13:06 bug#46847: 28.0.50; [native-comp] assume pseudo-insns should be verified Pip Cet
2021-03-01 20:12 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-02  6:57   ` Pip Cet
2021-03-05 11:16     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-05 16:09 ` Pip Cet
2021-03-05 19:36   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-14 21:07   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-20  9:30     ` Andrea Corallo
2024-03-20 13:05       ` Eli Zaretskii
2024-03-20 13:58         ` Andrea Corallo
2024-03-20 14:09           ` Eli Zaretskii

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).