[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master c4d34d2: CC Mode: Enhance C++ Mode raw strings to multi-line

From: Basil L. Contovounesios
Subject: Re: master c4d34d2: CC Mode: Enhance C++ Mode raw strings to multi-line strings for any language
Date: Thu, 19 Aug 2021 01:15:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Alan Mackenzie [2021-08-18 20:47 +0000] wrote:

>> To my above configuration, I added --enable-checking=structs, and with
>> that I can reproduce the hang using your recipe above.
>> But with TEST_LOAD_EL=yes, the test runs to completion.  This suggests
>> there is some bug in the compilation of some .el file -
>> electric-test.el, perhaps?  Are we talking about a .elc or a .eln here?
> You say c-beginning-of-macro seems to be hanging.

Yes, that's as deep as I got with print debugging before calling it a

> js.el advises c-beginning-of-macro (along with two other CC Mode
> functions), and this may have something to do with it.
> At least, if I comment out all the lines in test/lisp/electric-tests.el
> with "js" in them (apart from the first occurrence, where one just
> comments out "js-mode" from the line), then the hang doesn't happen.
> Something to think about.

Indeed, if I comment out all the js-mode-related
define-electric-pair-test forms, as well as the js-mode inside
define-electric-pair-test, then

  make TEST_LOAD_EL=no test/electric-tests

no longer hangs, but electric-pair-open-extra-newline fails.

Tonight, I tried the following approach instead (in an unedited source

0. C-x p c make TEST_LOAD_EL=no test/electric-tests RET
1. M-! pkill -SIGUSR2 -f ert-run-tests RET

I repeated this a few times, and the *emacs-compilation* buffer reliably
contained the same backtrace:

--8<---------------cut here---------------start------------->8---
Test electric-layout-plainer-c-mode-use-c-style backtrace:
  c-tnt-chng-cleanup(nil [(nil . t) #<buffer *Test buffer (electric-la
  #f(compiled-function () #<bytecode 0x1ce6cae08acf>)()
  self-insert-command(1 123)
  funcall-interactively(self-insert-command 1 123)
  #f(compiled-function () #<bytecode -0x8b013aec04deab5>)()
  ert--call-with-test-buffer(nil #f(compiled-function () #<bytecode -0
  #f(compiled-function () #<bytecode -0x10479e86da51cfc>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name electric-layout-plainer-c-mode-use-c-
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":." "-L" "./../../elpa/packages/url-http-ntlm/
Test electric-layout-plainer-c-mode-use-c-style condition:
    Buffer: *Test buffer (electric-layout-plainer-c-mode-use-c-style)*
     QUIT    5/478  electric-layout-plainer-c-mode-use-c-style (54.497779 sec)
--8<---------------cut here---------------end--------------->8---

Sprinkling some prints in c-tnt-chng-cleanup revealed that the following
loop never terminates:

  (let ((undo-in-progress t))
    (while (not (eq (setq buffer-undo-list
                          (primitive-undo 1 buffer-undo-list))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]