Subject: Re: bug#47067: 28.0.50; [feature/native-comp] Crash while scrolling through dispnew.c

From: Eli Zaretskii <[email-masked]>
Date: Sun, 14 Mar 2021 10:20:41 +0200

> From: Andrea Corallo <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Sun, 14 Mar 2021 06:57:36 +0000
> 
> >> PS Eli, even better would be to run all tests in comp-tests.el as a
> >> quick sanity check to verify that all is okay.
> >
> > This is on my list of things to do, but with such basic instability I
> > thought it was premature.
> 
> Running tests in comp-tests.el should take a couple of minutes and in
> case we catch a fail there we'd already have a reduced reproducer to
> look at, so yeah I suggest to have a run when you can as I think might
> have a good return for the investment.

The results of running "make src/comp-tests" are below.  As you see,
stage2 compilation crashed.  (Is 153 sec for stage1 a reasonable time,
btw?)  The backtrace is not useful: it shows only the stages since the
SIGSEGV delivery.

Any other tests you'd like me to try?

  $ make src/comp-tests
  make[1]: Entering directory `/d/gnu/git/emacs/native-comp/test'
    ELC+ELN      src/comp-tests.elc

  In toplevel form:
  src/comp-tests.el:120:14: Warning: reference to free variable
      `comp-tests-var1'
  src/comp-tests.el:676:15: Warning: reference to free variable
      `comp-test-up-val'

  In end of data:
  src/comp-tests.el:1438:1: Warning: the following functions are not known to be
      defined: comp-tests-varref-f, comp-tests-list-f, comp-tests-list2-f,
      comp-tests-car-f, comp-tests-cdr-f, comp-tests-car-safe-f,
      comp-tests-cdr-safe-f, comp-tests-cons-car-f, comp-tests-cons-cdr-f,
      comp-tests-varset0-f, comp-tests-varset1-f, comp-tests-length-f,
      comp-tests-aref-aset-f, comp-tests-symbol-value-f, comp-tests-concat-f,
      comp-tests-ffuncall-callee-optional-f, comp-tests-ffuncall-callee-rest-f,
      comp-tests-ffuncall-callee-more8-f,
      comp-tests-ffuncall-callee-more8-rest-f, comp-tests-ffuncall-native-f,
      comp-tests-ffuncall-native-rest-f, comp-tests-ffuncall-apply-many-f,
      comp-tests-ffuncall-lambda-f, comp-tests-jump-table-1-f,
      comp-tests-jump-table-2-f, comp-tests-conditionals-1-f,
      comp-tests-conditionals-2-f, comp-tests-fixnum-1-minus-f,
      comp-tests-fixnum-1-plus-f, comp-tests-fixnum-minus-f,
      comp-tests-hint-fixnum-f, comp-tests-hint-cons-f, comp-tests-eqlsign-f,
      comp-tests-gtr-f, comp-tests-lss-f, comp-tests-les-f, comp-tests-geq-f,
      comp-tests-setcar-f, comp-tests-setcdr-f, comp-bubble-sort-f,
      comp-tests-consp-f, comp-tests-setcar2-f, comp-tests-integerp-f,
      comp-tests-numberp-f, comp-tests-discardn-f, comp-tests-insertn-f,
      comp-tests-condition-case-0-f, comp-tests-condition-case-1-f,
      comp-tests-catch-f, comp-tests-throw-f, comp-tests-buff0-f,
      comp-tests-lambda-return-f, comp-tests-fib-f, comp-tests-string-trim-f,
      comp-tests-trampoline-removal-f, comp-tests-signal-f,
      comp-tests-func-call-removal-f, comp-tests-doc-f,
      comp-test-interactive-form0-f, comp-test-interactive-form1-f,
      comp-test-interactive-form2-f, comp-tests-free-fun-f,
      comp-tests/freefun-f, comp-test-40187-1-f, comp-test-40187-2-f,
      comp-test-speed--1-f, comp-test-42360-f, comp-test-44968-f,
      comp-test-45342-f, comp-test-assume-double-neg-f,
      comp-test-assume-in-loop-1-f, comp-test-45376-1-f, comp-test-45376-2-f,
      comp-test-primitive-advice-f, comp-test-primitive-redefine-f,
      comp-test-defsubst-f, comp-test-and-3-f, comp-test-copy-insn-f,
      comp-test-cond-rw-1-2-f, comp-test-not-cons-f, comp-test-45576-f,
      comp-test-45635-f, comp-test-45603--file-local-name, comp-test-46670-2-f,
      comp-test-46824-1-f, comp-test-consp, comp-test-listp, comp-test-stringp,
      comp-test-symbolp, comp-test-integerp, comp-test-numberp, comp-test-add1,
      comp-test-sub1, comp-test-negate, comp-test-not, comp-test-bobp,
      comp-test-eobp, comp-test-point-min, comp-test-point, comp-test-point-max,
      comp-test-car, comp-test-cdr, comp-test-car-safe, comp-test-cdr-safe,
      comp-test-eq, comp-test-if, comp-test-and, comp-test-or,
      comp-test-save-excursion, comp-test-current-buffer, comp-test->,
      comp-test-catch, comp-test-memq, comp-test-listN, comp-test-concatN,
      comp-test-opt-rest, comp-test-opt, comp-test-unwind-protect,
      comp-tests-ffuncall-callee-dyn-f, comp-tests-ffuncall-callee-opt-dyn-f,
      comp-tests-ffuncall-callee-rest-dyn-f,
      comp-tests-ffuncall-callee-opt-rest-dyn-f, comp-tests-cl-macro-exp-f,
      comp-tests-cl-uninterned-arg-parse-f, comp-tests-tco-f,
      comp-tests-fw-prop-1-f, comp-tests-pure-caller-f,
      comp-tests-pure-fibn-entry-f
    GEN      src/comp-tests.log
  Compiling tests...

  In comp-tests-discardn-f:
  comp-test-funcs.el:192:31: Warning: Unused lexical argument `x'

  In comp-test-40187-2-f:
  comp-test-funcs.el:286:8: Warning: function `comp-test-40187-2-f' defined
      multiple times in this file

  In comp-test-42360-f:
  comp-test-funcs.el:299:26: Warning: Unused lexical variable `str-width'
  comp-test-funcs.el:318:25: Warning: Unused lexical variable `ellipsis-width'

  In comp-test-46824-1-f:
  comp-test-funcs.el:488:11: Warning: value returned from (format "%S"
      (error-message-string err)) is unused
  comp-test-funcs.el:493:18: Warning: Unused lexical variable `recipe'

  In comp-test-silly-frame2:
  comp-test-funcs.el:628:32: Warning: Unused lexical argument `token'
  comp-test-funcs.el:630:10: Warning: reference to free variable `c'

  In comp-test-big-interactive:
  comp-test-funcs.el:665:12: Warning: byte-compile-file called with 2 arguments,
      but accepts only 1
  Loading d:/usr/MSYS/nonexistent/.emacs.d/eln-cache/28.0.50-7d88f6c1/comp-test-funcs-5c1d19b4-2b9f725f.eln (native compiled elisp)...
  Loading d:/usr/MSYS/nonexistent/.emacs.d/eln-cache/28.0.50-7d88f6c1/comp-test-funcs-dyn-a078e8f7-55bd648f.eln (native compiled elisp)...
  Running 165 tests (2021-03-14 10:08:59+0200, selector `(not (tag :unstable))')
     passed    1/165  comp-tests-45576-1 (0.000000 sec)

  In comp-test-45603--call-marked:
  comp-test-45603.el:10:38: Warning: Unused lexical argument `action'
  comp-test-45603.el:11:30: Warning: Unused lexical variable `marked-candidates'
  comp-test-45603.el:13:12: Warning: `mapcar' called for effect; use `mapc' or
      `dolist' instead
  comp-test-45603.el:19:12: Warning: Unused lexical variable `multi-action'
  comp-test-45603.el:20:59: Warning: Empty let* body

  In end of data:
  comp-test-45603.el:29:1: Warning: the function
      `comp-test-45603--get-multi-action' is not known to be defined.
  Loading d:/usr/MSYS/nonexistent/.emacs.d/eln-cache/28.0.50-7d88f6c1/comp-test-45603-25594de9-dc7d2de5.eln (native compiled elisp)...
     passed    2/165  comp-tests-45603-1 (2.031250 sec)
     passed    3/165  comp-tests-45635-1 (0.000000 sec)
     passed    4/165  comp-tests-46670-1 (0.000000 sec)
     passed    5/165  comp-tests-46824-1 (0.015625 sec)
     passed    6/165  comp-tests-> (0.000000 sec)
     passed    7/165  comp-tests-add1 (0.000000 sec)
     passed    8/165  comp-tests-and (0.000000 sec)
     passed    9/165  comp-tests-and-3 (0.000000 sec)
     passed   10/165  comp-tests-apply (0.000000 sec)
     passed   11/165  comp-tests-aref-aset (0.000000 sec)
     passed   12/165  comp-tests-arith-comp (0.000000 sec)
     passed   13/165  comp-tests-assume-double-neg (0.000000 sec)
     passed   14/165  comp-tests-assume-in-loop-1 (0.000000 sec)
     passed   15/165  comp-tests-bobp-and-eobp (0.000000 sec)
  Loading d:/gnu/git/emacs/native-comp/test/src/../../lisp/emacs-lisp/comp.elc...
  Compiling stage1...
  libgccjit-0.dll: note: disable pass tree-isolate-paths for functions in the range of [0, 4294967295]
  Done in 153 secs
  Loading d:/gnu/git/emacs/native-comp/native-lisp/28.0.50-7d88f6c1/stage1-Wif12F-15c85b93-ed123e94.eln (native compiled elisp)...
  Compiling stage2...
  libgccjit-0.dll: note: disable pass tree-isolate-paths for functions in the range of [0, 4294967295]

  Exception 0xc0000005 at this address:
  074bbd71

  Backtrace:
  0135ae16
  0135ae95
  0115c633
  0119b8c1
  0119b89b
  0119b8f6
  010010cd
  7c864eb5
  7c843e7e

  This application has requested the Runtime to terminate it in an unusual way.
  Please contact the application's support team for more information.
  Makefile:177: recipe for target `src/comp-tests.log' failed
  make[1]: *** [src/comp-tests.log] Error 3
  make[1]: Leaving directory `/d/gnu/git/emacs/native-comp/test'
  Makefile:243: recipe for target `src/comp-tests' failed
  make: *** [src/comp-tests] Error 2