unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64613: Signalling byte ops should show up in backtraces
@ 2023-07-14 14:20 Mattias Engdegård
  2023-07-14 17:51 ` Mattias Engdegård
  0 siblings, 1 reply; 3+ messages in thread
From: Mattias Engdegård @ 2023-07-14 14:20 UTC (permalink / raw)
  To: 64613; +Cc: Stefan Monnier

Many byte ops don't appear in the backtrace if they signal an error. This makes it unnecessarily difficult to find the precise location of the error.

Most operations that replace a function call, such as `cdr`, `+`, `memq` and so on, have this problem.

The tricky part is to include the function in the backtrace without slowing down normal execution.






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

* bug#64613: Signalling byte ops should show up in backtraces
  2023-07-14 14:20 bug#64613: Signalling byte ops should show up in backtraces Mattias Engdegård
@ 2023-07-14 17:51 ` Mattias Engdegård
  2023-07-26 17:07   ` Mattias Engdegård
  0 siblings, 1 reply; 3+ messages in thread
From: Mattias Engdegård @ 2023-07-14 17:51 UTC (permalink / raw)
  To: 64613; +Cc: Stefan Monnier

A small improvement, only covering car, cdr, setcar, sector, and (partially) nth and elt, was pushed in 8acd52bba4.
This is low-hanging fruit and worth doing for the benefit it brings even if we end up using a more general solution later on.







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

* bug#64613: Signalling byte ops should show up in backtraces
  2023-07-14 17:51 ` Mattias Engdegård
@ 2023-07-26 17:07   ` Mattias Engdegård
  0 siblings, 0 replies; 3+ messages in thread
From: Mattias Engdegård @ 2023-07-26 17:07 UTC (permalink / raw)
  To: 64613; +Cc: Alan Mackenzie, Stefan Monnier

Now (82f5f3b8a2) the `aref` and `aset` byte-ops provide backtrace records for errors that are discovered in the fast path:

- index argument not a fixnum
- for vector and record arguments, index out of range

For other types there is no such help yet since we call out to Faref and Faset.

We need a general strategy for dealing with such call-outs from the bytecode engine. So far, the backtrace records have all been to cold paths with no new hot-path code.






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

end of thread, other threads:[~2023-07-26 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 14:20 bug#64613: Signalling byte ops should show up in backtraces Mattias Engdegård
2023-07-14 17:51 ` Mattias Engdegård
2023-07-26 17:07   ` Mattias Engdegård

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