unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: bignum branch
Date: Mon, 16 Jul 2018 23:28:30 +0100	[thread overview]
Message-ID: <86tvoy3je9.fsf@gmail.com> (raw)
In-Reply-To: 87a7qr8cz7.fsf@tromey.com

On Mon 16 Jul 2018, Tom Tromey wrote:

>>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
>
> Tom> I was thinking this is what I' have emacs do when
> Tom> sizeof(EMACS_INT) > sizeof(long).
>
> Please try this patch.
>
> Unfortunately I don't know how I can test it locally

This builds ok on Windows with 64bit mingw64 (MSYS2), but still has a
few issues and some odd behaviour:
 - Some GCC warnings
 - A selection of marker related issues
 - A problem with the ccl.el compiler for CCL programs
 - Some test failures
 - eassert() failures in make_bignum_str() during tests.
   Possible issues are that its caller, string_to_number() does not 
   appear to handle the S2N_IGNORE_TRAILING flag for arguments that
   end up as bignums.
   It is also possible that string_to_number() has slightly different
   semantics for its `base' argument from mpz_set_str().
  


1) Some GCC warnings:

C:/emacs/git/emacs/bignum/src/search.c: In function 'Freplace_match':
C:/emacs/git/emacs/bignum/src/search.c:2651:15: warning: argument 1 value '2305843009213693951' exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
       substed = xmalloc (substed_alloc_size);
       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/emacs/git/emacs/bignum/src/search.c:24:0:
C:/emacs/git/emacs/bignum/src/lisp.h:4548:14: note: in a call to allocation function 'xmalloc' declared here
 extern void *xmalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1));
              ^~~~~~~

2) A selection of marker related issues:

In toplevel form:
../../../lisp/cedet/semantic/wisent/javat-wy.el:265:17:Error: Wrong type argument: number-or-marker-p, 1152921504606846975
In toplevel form:
../../../lisp/cedet/semantic/wisent/js-wy.el:185:17:Error: Wrong type argument: number-or-marker-p, 1152921504606846975
In toplevel form:
../../../lisp/cedet/semantic/wisent/python-wy.el:237:17:Error: Wrong type argument: number-or-marker-p, 1152921504606846975

Eager macro-expansion failure: (wrong-type-argument number-or-marker-p 1152921504606846975)
In toplevel form:
../../../lisp/cedet/semantic/wisent/python.el:38:1:Error: Wrong type argument: number-or-marker-p, 1152921504606846975


3) A problem with the ccl.el compiler for CCL programs. I think that
   this can be fixed by truncating the CCL code words output by the
   compiler in ccl.el to ensure that they doe not extend beyond the
   expected 28bit code word. The interpreter in ccl.c appears to range
   check the code words properly.

In toplevel form:
../../../lisp/obsolete/pgg.el:29:1:Error: Error in CCL program
In toplevel form:
../../../lisp/obsolete/pgg-gpg.el:32:1:Error: Error in CCL program
In toplevel form:
../../../lisp/obsolete/pgg-pgp.el:30:1:Error: Error in CCL program
In toplevel form:
../../../lisp/obsolete/pgg-pgp5.el:30:1:Error: Error in CCL program


4) Some test failures. I have omitted conditions for tests with similar
complaints about number-or-markerp.

Test test-calc-23889 condition:
    (wrong-type-argument number-or-marker-p 3568982627)
   FAILED  1/5  test-calc-23889 (0.084549 sec)

Test test-calc-convert-units condition:
    (ert-test-failed
     ((should
       (calc-tests-equal
	(calc-tests-simple ... "-1 m" nil "cm")
	'...))
      :form
      (calc-tests-equal nil
			(* -100
			   (var cm var-cm)))
      :value nil))
   FAILED  2/5  test-calc-convert-units (0.018381 sec)

Test test-calc-extract-units condition:
    (ert-test-failed
     ((should
       (calc-tests-equal
	(calc-tests-simple ... "-1 m")
	'...))
      :form
      (calc-tests-equal nil
			(var m var-m))
      :value nil))
   FAILED  3/5  test-calc-extract-units (0.001062 sec)

Test test-calc-remove-units condition:
    (ert-test-failed
     ((should
       (calc-tests-equal
	(calc-tests-simple ... "-1 m")
	-1))
      :form
      (calc-tests-equal nil -1)
      :value nil))
   FAILED  4/5  test-calc-remove-units (0.023494 sec)

Test test-math-bignum condition:
    (wrong-type-argument number-or-marker-p 2305843009)
   FAILED  5/5  test-math-bignum (0.000160 sec)

Test dired-test-bug25609 condition:
    (wrong-type-argument numberp #<marker in no buffer>)
   FAILED   3/11  dired-test-bug25609 (0.028504 sec)

Test viper-test-undo-2 condition:
    (error "Wrong type argument: numberp, #<marker at 3 in *viper-test-buffer*>")
   FAILED  4/6  viper-test-undo-2 (0.053162 sec)

Test eshell-test/command-running-p condition:
    (wrong-type-argument numberp #<marker at 29 in *eshell*>)
   FAILED   1/29  eshell-test/command-running-p (0.124705 sec)

Test number-sequence-test condition:
    (ert-test-failed
     ((should
       (=
	(length ...)
	2))
      :form
      (= 1 2)
      :value nil))
   FAILED   2/15  number-sequence-test (0.000085 sec)

Test simple-transpose-subr condition:
    (wrong-type-argument numberp #<marker in no buffer>)

Test bignum-abs condition:
    (ert-test-failed
     ((should
       (= most-positive-fixnum
	  (- ... 1)))
      :form
      (= 2305843009213693951 2305843009213693951)
      :value nil))

Test data-tests-/ condition:
    (ert-test-failed
     ((should
       (= most-positive-fixnum
	  (/ x 8)))
      :form
      (= 2305843009213693951 -1)
      :value nil))
   FAILED  22/41  data-tests-/ (0.000130 sec)

Test data-tests-1+ condition:
    (ert-test-failed
     ((should
       (fixnump
	(1+ ...)))
      :form
      (fixnump -2305843009213693952)
      :value nil))
   FAILED  23/41  data-tests-1+ (0.000151 sec)

Test data-tests-1- condition:
    (ert-test-failed
     ((should
       (fixnump
	(1- ...)))
      :form
      (fixnump 2305843009213693951)
      :value nil))
   FAILED  24/41  data-tests-1- (0.000166 sec)

Test data-tests-ash-lsh condition:
    (ert-test-failed
     ((should
       (=
	(ash most-negative-fixnum 1)
	(* most-negative-fixnum 2)))
      :form
      (= -4611686018427387904 0)
      :value nil))
   FAILED  30/41  data-tests-ash-lsh (0.000129 sec)


5) Assertion failures in tests. I've omitted the backtrace as it isn;t
much use without decoding it, and this post is long enough already. I
assume that the failing test is the next test after the previously
reported passing test.

   passed  33/41  data-tests-local-variable-watchers (0.000995 sec)
Backtrace:
...
make[2]: *** [Makefile:182: src/data-tests.log] Error 3


   passed  13/20  format-with-field (0.000145 sec)
Backtrace:
...
C:/emacs/git/emacs/bignum/src/alloc.c:3795: Emacs fatal error: assertion failed: check == 0
make[2]: *** [Makefile:182: src/editfns-tests.log] Error 3




  reply	other threads:[~2018-07-16 22:28 UTC|newest]

Thread overview: 205+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13  4:26 bignum branch Tom Tromey
2018-07-13  7:38 ` Eli Zaretskii
2018-07-13  8:45 ` Robert Pluim
2018-07-13  9:51   ` Robert Pluim
2018-07-13 11:59     ` Eli Zaretskii
2018-07-13 13:31       ` Robert Pluim
2018-07-13 18:06         ` Tom Tromey
2018-07-13 12:04     ` Eli Zaretskii
2018-07-13 12:14       ` Eli Zaretskii
2018-07-13 13:02         ` Robert Pluim
2018-07-13 13:50           ` Eli Zaretskii
2018-07-15 16:29             ` Andy Moreton
2018-07-17 18:10               ` Robert Pluim
2018-07-17 18:24                 ` Eli Zaretskii
2018-07-17 19:06                   ` Eli Zaretskii
2018-07-17 20:00                   ` Robert Pluim
2018-07-17 21:17                     ` Clément Pit-Claudel
2018-07-18  1:01                       ` Stefan Monnier
2018-07-18  9:28                 ` Andy Moreton
2018-07-18 13:21                   ` Robert Pluim
2018-07-18 13:32                     ` Stefan Monnier
2018-07-18 16:01                     ` Eli Zaretskii
2018-07-18 16:21                       ` Robert Pluim
2018-07-18 16:47                         ` Eli Zaretskii
2018-07-13 12:34       ` Robert Pluim
2018-07-13 14:28 ` Andy Moreton
2018-07-13 14:42   ` Eli Zaretskii
2018-07-13 14:53     ` Andy Moreton
2018-07-13 15:03       ` Eli Zaretskii
2018-07-13 15:30   ` Andy Moreton
2018-07-13 19:35     ` Andy Moreton
2018-07-14 16:20       ` Eli Zaretskii
2018-07-14 20:04         ` Andy Moreton
2018-07-15 13:46           ` Tom Tromey
2018-07-15 15:01             ` Eli Zaretskii
2018-07-16 12:19               ` Stefan Monnier
2018-07-16 14:40                 ` Eli Zaretskii
2018-07-16 16:09                   ` Stefan Monnier
2018-07-16 18:06                     ` Eli Zaretskii
2018-07-16 18:32                       ` Stefan Monnier
2018-07-16 18:42                         ` Eli Zaretskii
2018-07-16 14:35             ` Tom Tromey
2018-07-16 22:28               ` Andy Moreton [this message]
2018-07-21 15:35                 ` Andy Moreton
2018-07-22 16:43                   ` Tom Tromey
2018-07-22 17:41                     ` Andy Moreton
2018-08-03  0:43                       ` Andy Moreton
2018-08-03  6:23                         ` Eli Zaretskii
2018-08-03  9:01                           ` Andy Moreton
2018-08-03  9:47                             ` Eli Zaretskii
2018-08-03 10:07                               ` Andy Moreton
2018-08-03 13:16                                 ` Eli Zaretskii
2018-08-03 14:05                                   ` Andy Moreton
2018-08-03 17:44                                     ` Eli Zaretskii
2018-08-03 19:54                                       ` Andy Moreton
2018-08-04  6:11                                         ` Eli Zaretskii
2018-08-04 11:14                                           ` Andy Moreton
2018-08-04 11:29                                             ` Eli Zaretskii
2018-08-03 20:17                                       ` Tom Tromey
2018-08-03 21:02                                         ` Paul Eggert
2018-08-03 21:19                                           ` Tom Tromey
2018-08-04  1:22                                             ` Paul Eggert
2018-08-04  6:18                                               ` Eli Zaretskii
2018-08-04 10:49                                                 ` Achim Gratz
2018-08-04 11:07                                                   ` Eli Zaretskii
2018-08-04 10:43                                             ` Achim Gratz
2018-08-04 16:33                                               ` Tom Tromey
2018-08-04 18:28                                                 ` Achim Gratz
2018-08-04  6:20                                           ` Eli Zaretskii
2018-08-04 11:17                                         ` Andy Moreton
2018-08-04 16:41                                           ` Tom Tromey
2018-08-06 10:18                                             ` Robert Pluim
2018-08-07  0:36                                           ` Tom Tromey
2018-08-07  8:38                                             ` Andy Moreton
2018-08-08  0:25                                               ` Tom Tromey
2018-08-04 17:10                                         ` Tom Tromey
2018-08-03 17:30                           ` Tom Tromey
2018-08-03 19:16                             ` Andy Moreton
2018-08-04  6:07                               ` Eli Zaretskii
2018-08-05 11:36                                 ` Andy Moreton
2018-08-05 15:18                                   ` Eli Zaretskii
2018-08-06 18:12                                     ` Andy Moreton
2018-08-07  0:41                                       ` Tom Tromey
2018-08-07  2:03                                         ` Paul Eggert
2018-08-07  3:59                                           ` Tom Tromey
2018-08-07  4:02                                             ` Tom Tromey
2018-08-07 11:22                                             ` Andy Moreton
2018-08-07 16:53                                             ` Paul Eggert
2018-08-07 17:12                                               ` Eli Zaretskii
2018-08-07 17:52                                                 ` Paul Eggert
2018-08-08  0:23                                                   ` Tom Tromey
2018-08-07 11:17                                         ` Andy Moreton
2018-08-08  0:26                                           ` Tom Tromey
2018-08-08 14:24                                             ` Andy Moreton
2018-08-08 16:35                                         ` Andy Moreton
2018-08-08 23:14                                           ` Tom Tromey
2018-08-09  2:33                                             ` Eli Zaretskii
2018-08-09  7:59                                               ` Michael Albinus
2018-08-09 13:01                                                 ` Eli Zaretskii
2018-08-09 17:31                                                   ` Paul Eggert
2018-08-09 18:32                                                     ` Eli Zaretskii
2018-08-09 19:22                                                     ` Stefan Monnier
2018-08-09 16:34                                               ` Tom Tromey
2018-08-09 18:28                                                 ` Eli Zaretskii
2018-08-09 19:30                                                 ` Tom Tromey
2018-08-08 23:37                                           ` Tom Tromey
2018-08-09  0:07                                             ` Andy Moreton
2018-08-09  2:03                                               ` Tom Tromey
2018-08-09  9:19                                                 ` Andy Moreton
2018-08-09 20:49                                                 ` Andy Moreton
2018-08-10  5:45                                                   ` Eli Zaretskii
2018-08-10  7:43                                                     ` Andy Moreton
2018-08-10  7:59                                                       ` Paul Eggert
2018-08-10  9:48                                                         ` Eli Zaretskii
2018-08-10 20:58                                                           ` Paul Eggert
2018-08-11  7:08                                                             ` Eli Zaretskii
2018-08-11  8:02                                                               ` Paul Eggert
2018-08-11 10:50                                                                 ` Eli Zaretskii
2018-08-11 12:57                                                                   ` Stefan Monnier
2018-08-11 19:38                                                                   ` Paul Eggert
2018-08-10 11:18                                                         ` Andy Moreton
2018-08-10 11:56                                                           ` Andreas Schwab
2018-08-10 12:25                                                             ` Eli Zaretskii
2018-08-10 12:27                                                             ` Andy Moreton
2018-08-10 18:37                                                               ` Achim Gratz
2018-08-10 12:26                                                           ` Eli Zaretskii
2018-08-10 12:46                                                             ` Andy Moreton
2018-08-10  9:46                                                       ` Eli Zaretskii
2018-08-10 11:39                                                         ` Andy Moreton
2018-08-10 12:33                                                           ` Eli Zaretskii
2018-08-10 14:05                                                             ` Andy Moreton
2018-08-10 19:57                                                               ` Eli Zaretskii
2018-08-11 15:21                                                                 ` Andy Moreton
2018-08-11 15:25                                                                   ` Tom Tromey
2018-08-11 16:04                                                                     ` Eli Zaretskii
2018-08-11 16:16                                                                   ` Eli Zaretskii
2018-08-11 16:54                                                                     ` Andy Moreton
2018-08-11 17:34                                                                       ` Eli Zaretskii
2018-08-11 17:56                                                                         ` Andy Moreton
2018-08-11 18:10                                                                           ` Eli Zaretskii
2018-08-11 18:15                                                                             ` Andy Moreton
2018-08-11 19:08                                                                               ` Eli Zaretskii
2018-08-11 22:15                                                                                 ` Andy Moreton
2018-08-12 18:54                                                                                   ` Eli Zaretskii
2018-08-12 19:44                                                                                     ` Andy Moreton
2018-08-13 15:02                                                                                       ` Eli Zaretskii
2018-08-13 23:13                                                                                         ` Andy Moreton
2018-08-14 14:55                                                                                           ` Eli Zaretskii
2018-08-14 15:11                                                                                             ` Andy Moreton
2018-08-14 15:19                                                                                               ` Eli Zaretskii
2018-08-14 16:16                                                                                                 ` Andy Moreton
2018-08-15 17:01                                                                                                   ` Eli Zaretskii
2018-08-11 17:00                                                                     ` Andy Moreton
2018-08-10 15:25                                                             ` Stefan Monnier
2018-08-10 16:45                                                               ` Andy Moreton
2018-08-10 19:34                                                               ` Eli Zaretskii
2018-08-09  3:49                                               ` Stefan Monnier
2018-08-09  9:21                                                 ` Andy Moreton
2018-08-09  2:37                                             ` Eli Zaretskii
2018-08-03 20:13                         ` Tom Tromey
2018-08-04 16:39                         ` Tom Tromey
2018-08-04 17:24                           ` Tom Tromey
2018-08-05 10:46                           ` Andy Moreton
2018-08-05 18:59                             ` Tom Tromey
2018-08-06 18:17                               ` Andy Moreton
2018-07-15 15:00           ` Eli Zaretskii
2018-07-15 17:31             ` Paul Eggert
2018-07-15 18:27               ` Eli Zaretskii
2018-07-16 19:02                 ` Paul Eggert
2018-07-17  2:42                   ` Eli Zaretskii
2018-07-17 15:53                     ` Paul Eggert
2018-07-17 17:03                       ` Eli Zaretskii
2018-07-17 17:24                         ` Paul Eggert
2018-07-17 17:38                           ` Eli Zaretskii
2018-07-17 17:41                             ` Paul Eggert
2018-07-17 17:53                               ` Eli Zaretskii
2018-07-17 18:55                                 ` Paul Eggert
2018-07-17 19:04                                   ` Eli Zaretskii
2018-07-17 22:39                                     ` Paul Eggert
2018-07-18  2:41                                       ` Eli Zaretskii
2018-07-18  7:39                                         ` Paul Eggert
2018-07-18 11:14                                           ` Andy Moreton
2018-07-18 11:57                                             ` Paul Eggert
2018-07-18 13:09                                               ` Clément Pit-Claudel
2018-07-18 13:18                                                 ` Stefan Monnier
2018-07-18 13:43                                                   ` Clément Pit-Claudel
2018-07-18 14:06                                                     ` Andy Moreton
2018-07-18 19:25                                                       ` Achim Gratz
2018-07-18 20:41                                                         ` Stefan Monnier
2018-07-19  2:36                                                           ` Eli Zaretskii
2018-07-19 20:32                                                         ` Paul Eggert
2018-07-20 20:02                                                           ` Achim Gratz
2018-07-20 20:58                                                             ` Paul Eggert
2018-07-20 21:48                                                               ` Stefan Monnier
2018-07-22 19:49                                                               ` Achim Gratz
2018-07-18 18:29                                                 ` Paul Eggert
2018-07-18 11:10                                       ` Andy Moreton
2018-07-18 18:34                                         ` Paul Eggert
2018-07-25 21:02             ` Andy Moreton
2018-08-09 14:26 ` Charles A. Roelli
2018-08-09 15:17   ` Andy Moreton
2018-08-09 16:23     ` Charles A. Roelli
2018-08-09 16:25     ` Tom Tromey
2018-08-09 17:08       ` Andy Moreton
2018-08-09 19:29         ` Tom Tromey

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=86tvoy3je9.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=emacs-devel@gnu.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).