GNU bug report logs - #41988
28.0.50; Edebug unconditionally instruments definitions with &define specs

Previous Next

Package: emacs;

Reported by: Philipp <p.stephani2 <at> gmail.com>

Date: Sun, 21 Jun 2020 17:00:02 UTC

Severity: normal

Found in version 28.0.50

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 41988 <at> debbugs.gnu.org
Subject: bug#41988: 28.0.50; Edebug unconditionally instruments definitions with &define specs
Date: Sun, 04 Apr 2021 16:16:16 -0400
>> [ Disclaimer: I don't understand the precise semantics of `gate`, tho
>>   I do remember using it once via trial-and-error.  So maybe it wouldn't
>>   prevent it, but if doesn't prevent it, then it doesn't likely "fix"
>>   our problem ;-)  ]
> AIUI the semantics of "gate" aren't that complex, it just means "don't
> backtrack beyond this point."

[ Yes, that's the part I understand.  But it's not clear where
  backtracking is possible and where it's not.  At least, the code that
  I saw in edebug.el didn't match my expectations back when I looked at
  it, hence my not feeling quite sure what the semantics are (and/or
  should be).
  IIRC the issue was that the scope of that effect wasn't clear: if you
  think of Prolog's cut, its effect is local to a particular definition,
  whereas I think the scope of `gate` is not nearly as clear because
  there isn't such a notion of "definition".  ]

>> >> I'm not sure it's worth the trouble: the pain seems higher than the gain.
>> > This bug is rather nasty when it's hit (it took me quite a while to
>> > debug/hunt down),
>> Could you remind me what was this nasty outcome?
> The original bug report was
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41853 (extremely subtle
> bug due to mismatch between frequency and offset vector).

Thanks, that's worst than I thought indeed.

>> > so I think it would be reasonable to prevent.  We already
>> > disable backtracking for literal symbols, and I think forms that require
>> > multiple &define forms with backtracking should be exceedingly rare and can
>> > be rewritten as you did with cl-flet.
>> Emitting a warning would be much more helpful than just silently
>> "cut"ting the backtracking.
> A gate isn't silent, it would cause a hard error in this case.

What I meant is that a gate would just make the old cl-flet spec fail in
most cases, with no explanation why that spec now fails even though it
worked in the past.


        Stefan





This bug report was last modified 4 years and 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.