unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pip Cet <pipcet@protonmail.com>
Cc: gerd.moellmann@gmail.com, spd@toadstyle.org, acorallo@gnu.org,
	monnier@iro.umontreal.ca, 74966@debbugs.gnu.org
Subject: bug#74966: 31.0.50; Crash report (using igc on macOS)
Date: Sat, 21 Dec 2024 08:47:39 +0200	[thread overview]
Message-ID: <864j2xa5x0.fsf@gnu.org> (raw)
In-Reply-To: <87seqihyex.fsf@protonmail.com> (message from Pip Cet on Fri, 20 Dec 2024 20:50:56 +0000)

> Date: Fri, 20 Dec 2024 20:50:56 +0000
> From: Pip Cet <pipcet@protonmail.com>
> Cc: gerd.moellmann@gmail.com, spd@toadstyle.org, acorallo@gnu.org, monnier@iro.umontreal.ca, 74966@debbugs.gnu.org
> 
> "Eli Zaretskii" <eliz@gnu.org> writes:
> 
> > TBH, I'd be much happier without splitting 'doc' into two members.
> > Isn't it possible to avoid overwriting 'doc', thus avoiding the crash,
> > without splitting the member in two?
> 
> Absolutely.  That'd cause wrong docstrings for some symbols

Can you elaborate on that?  When and how could that happen?

> but reduce
> the risk of code not compiling anymore.  There is no risk of unvetted
> code compiling and accessing the doc field, because it's been renamed,
> but that does require, of course, to consider the changes in the patch
> as "vetted"; furthermore, if there is a compilation error in some code
> I've missed, we need to be careful not to fix it without checking that
> code, too.

I didn't have in mind problems that will be caught by the compiler --
these are easy to find and fix, even if it takes some time because
some code is only compiled on a certain rarely-used platform or
configuration.

> > DOC handling in Emacs is extremely complex and has many subtle
> > aspects.  Experience teaches us that bugs in this area sometimes take
> > years to report and fix.  Splitting a member into two risks
> > introducing bugs because we might use the wrong member in some
> > situation(s).
> 
> I don't understand this specific objection.  If we rename "doc" to
> "doc_offset", as I've proposed, we're automatically looking at all code
> which makes use of the new field, because code using the old name no
> longer compiles.

Yes, sure.  If we just rename a single member and all of its
references, there's no risk whatsoever.  I had something else in mind.
If we split the 'doc' member in two, some code which used 'doc' will
need to use 'doc_index', and some code will need to use 'doc_offset'.
The risk is in using the wrong one, because the intent of the original
code (i.e., whether it interprets 'doc' as an index or as an offset)
was not completely understood.  Moreover, it is possible that in some
places we'd need to set the value of one of these two members from the
value of the other, because the original code relied on the fact that
there's just one member whose value is sometimes interpreted as this
and sometimes as that.

> > The test suite's coverage of doc.c and features related
> > to doc strings is still rudimentary, so we cannot be sure any such
> > bugs will be caught in time by the tests.  Which is why I hope we can
> > avoid splitting this member in two.
> 
> I agree that the docfile hack in general is very hairy territory.  It
> might be safer to simply accept the wrong docstrings for now, and Gerd's
> patch does that, IIUC.  Can we just apply that for now and add a FIXME?

Maybe, but I'd like first to understand better the "wrong docstrings"
situations.

Thanks.





  parent reply	other threads:[~2024-12-21  6:47 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19  9:17 bug#74966: 31.0.50; Crash report (using igc on macOS) Sean Devlin
     [not found] ` <handler.74966.B.173459989517154.ack@debbugs.gnu.org>
2024-12-19  9:21   ` bug#74966: Acknowledgement (31.0.50; Crash report (using igc on macOS)) Sean Devlin
2024-12-19 10:28     ` Gerd Möllmann
2024-12-19 11:05       ` Sean Devlin
2024-12-19 11:30         ` Gerd Möllmann
2024-12-19 10:25 ` bug#74966: 31.0.50; Crash report (using igc on macOS) Gerd Möllmann
2024-12-19 11:57   ` Sean Devlin
2024-12-19 11:48 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 11:54   ` Sean Devlin
2024-12-19 14:02   ` Gerd Möllmann
2024-12-19 14:07     ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 14:44       ` Gerd Möllmann
2024-12-19 15:25         ` Gerd Möllmann
2024-12-19 19:21           ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 19:46             ` Gerd Möllmann
2024-12-20  7:00               ` Gerd Möllmann
2024-12-20  7:11                 ` Gerd Möllmann
2024-12-20  7:30                   ` Gerd Möllmann
2024-12-20  7:38                     ` Gerd Möllmann
2024-12-20  7:44                     ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20  8:12                     ` Eli Zaretskii
2024-12-20  8:21                       ` Gerd Möllmann
2024-12-20  8:35                         ` Eli Zaretskii
2024-12-20  8:43                           ` Gerd Möllmann
2024-12-20  8:57                             ` Gerd Möllmann
2024-12-20 16:17                               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 16:20                                 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 14:26                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 14:57                                     ` Gerd Möllmann
2024-12-21 15:18                                     ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 16:15                                       ` Eli Zaretskii
2024-12-20 16:40                                 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 17:17                                   ` Gerd Möllmann
2024-12-20 19:40                                   ` Eli Zaretskii
2024-12-20 20:50                                     ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 21:07                                       ` Gerd Möllmann
2024-12-21  7:09                                         ` Eli Zaretskii
2024-12-21  7:12                                           ` Gerd Möllmann
2024-12-21  6:47                                       ` Eli Zaretskii [this message]
2024-12-21  7:08                                         ` Gerd Möllmann
2024-12-21  7:51                                           ` Eli Zaretskii
2024-12-21  8:07                                             ` Gerd Möllmann
2024-12-21 10:09                                               ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 10:31                                                 ` Gerd Möllmann
2024-12-21 12:28                                                 ` Eli Zaretskii
2024-12-21 13:26                                                   ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 14:12                                                   ` Gerd Möllmann
2024-12-21 16:07                                                     ` Eli Zaretskii
2024-12-21 17:35                                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 18:15                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20  8:04                 ` Eli Zaretskii
2024-12-20  6:34             ` Eli Zaretskii
2024-12-19 15:31         ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 15:42           ` Gerd Möllmann

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=864j2xa5x0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=74966@debbugs.gnu.org \
    --cc=acorallo@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=pipcet@protonmail.com \
    --cc=spd@toadstyle.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).