unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Colin Baxter <m43cap@yandex.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Mark Oteiza <mvoteiza@udel.edu>, , emacs-devel@gnu.org
Subject: Re: data-tests-logcount Failure
Date: Tue, 24 Oct 2017 18:43:42 +0100	[thread overview]
Message-ID: <87mv4go301.fsf@yandex.com> (raw)
In-Reply-To: <7b839a97-dee5-2930-4c6d-a3c36a91a235@cs.ucla.edu> (Paul Eggert's message of "Tue, 24 Oct 2017 09:02:34 -0700")

[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]

>>>>> Paul Eggert <eggert@cs.ucla.edu> writes:

    > On 10/24/2017 03:07 AM, Colin Baxter wrote:
    >> FAILED data-tests-logcount
    > What are the values of (logcount 9727) and (logcount 9999) on your
    > platform? They should be 11 and 8, respectively.Are there more
    > details about this in the file test/src/data-tests.log?

    > How did you invoke 'configure'? What is the output of 'gcc
    > --version', and of 'cat /proc/cpuinfo'?

./configure --prefix=/home/redknight/local --with-mailutils

gcc-4.7.real (Debian 4.7.2-5) 4.7.2

cat /proc/cpuinfo gives:
========================

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 4
model name	: Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping	: 3
microcode	: 0x5
cpu MHz		: 3192.426
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl est cid cx16 xtpr
bogomips	: 6384.85
clflush size	: 64
cache_alignment	: 128
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 15
model		: 4
model name	: Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping	: 3
microcode	: 0x5
cpu MHz		: 3192.426
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 1
initial apicid	: 1
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl est cid cx16 xtpr
bogomips	: 6384.08
clflush size	: 64
cache_alignment	: 128
address sizes	: 36 bits physical, 48 bits virtual
power management:

    > Can you run Emacs under GDB and put a breakpoint on the Flogcount
    > function, and execute the above two Elisp calls while
    > single-stepping through Flogcount, and also disassemble Flogcount?

My gdb output is here:


[-- Attachment #2: gdb output --]
[-- Type: text/plain, Size: 12930 bytes --]

redknight@jetstar:~/git/emacs/src$ gdb bootstrap-emacs
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/redknight/git/emacs/src/bootstrap-emacs...done.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
DISPLAY = :0
TERM = dumb
Breakpoint 1 at 0x812e7a0: file emacs.c, line 363.
Temporary breakpoint 2 at 0x81476b0: file sysdep.c, line 1071.
(gdb) source .gdbinit
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
Redefine command "xgetptr"? (y or n) [answered Y; input not from terminal]
Redefine command "xgetint"? (y or n) [answered Y; input not from terminal]
Redefine command "xgettype"? (y or n) [answered Y; input not from terminal]
Redefine command "xgetsym"? (y or n) [answered Y; input not from terminal]
Redefine command "xsymname"? (y or n) [answered Y; input not from terminal]
Redefine command "pr"? (y or n) [answered Y; input not from terminal]
Redefine command "pp"? (y or n) [answered Y; input not from terminal]
Redefine command "pv"? (y or n) [answered Y; input not from terminal]
Redefine command "ppt"? (y or n) [answered Y; input not from terminal]
Redefine command "pitmethod"? (y or n) [answered Y; input not from terminal]
Redefine command "pitx"? (y or n) [answered Y; input not from terminal]
Redefine command "pit"? (y or n) [answered Y; input not from terminal]
Redefine command "prowx"? (y or n) [answered Y; input not from terminal]
Redefine command "prow"? (y or n) [answered Y; input not from terminal]
Redefine command "pcursorx"? (y or n) [answered Y; input not from terminal]
Redefine command "pcursor"? (y or n) [answered Y; input not from terminal]
Redefine command "pwinx"? (y or n) [answered Y; input not from terminal]
Redefine command "pwin"? (y or n) [answered Y; input not from terminal]
Redefine command "pbiditype"? (y or n) [answered Y; input not from terminal]
Redefine command "pgx"? (y or n) [answered Y; input not from terminal]
---Type <return> to continue, or q <return> to quit---
Redefine command "pg"? (y or n) [answered Y; input not from terminal]
Redefine command "pgi"? (y or n) [answered Y; input not from terminal]
Redefine command "pgn"? (y or n) [answered Y; input not from terminal]
Redefine command "pgrowx"? (y or n) [answered Y; input not from terminal]
Redefine command "pgrow"? (y or n) [answered Y; input not from terminal]
Redefine command "pgrowit"? (y or n) [answered Y; input not from terminal]
Redefine command "prowlims"? (y or n) [answered Y; input not from terminal]
Redefine command "pmtxrows"? (y or n) [answered Y; input not from terminal]
Redefine command "xtype"? (y or n) [answered Y; input not from terminal]
Redefine command "pvectype"? (y or n) [answered Y; input not from terminal]
Redefine command "xvectype"? (y or n) [answered Y; input not from terminal]
Redefine command "pvecsize"? (y or n) [answered Y; input not from terminal]
Redefine command "xvecsize"? (y or n) [answered Y; input not from terminal]
Redefine command "xmisctype"? (y or n) [answered Y; input not from terminal]
Redefine command "xint"? (y or n) [answered Y; input not from terminal]
Redefine command "xptr"? (y or n) [answered Y; input not from terminal]
Redefine command "xmarker"? (y or n) [answered Y; input not from terminal]
Redefine command "xoverlay"? (y or n) [answered Y; input not from terminal]
Redefine command "xmiscfree"? (y or n) [answered Y; input not from terminal]
Redefine command "xsymbol"? (y or n) [answered Y; input not from terminal]
Redefine command "xstring"? (y or n) [answered Y; input not from terminal]
Redefine command "xvector"? (y or n) [answered Y; input not from terminal]
Redefine command "xprocess"? (y or n) [answered Y; input not from terminal]
---Type <return> to continue, or q <return> to quit---
Redefine command "xframe"? (y or n) [answered Y; input not from terminal]
Redefine command "xcompiled"? (y or n) [answered Y; input not from terminal]
Redefine command "xwindow"? (y or n) [answered Y; input not from terminal]
Redefine command "xwinconfig"? (y or n) [answered Y; input not from terminal]
Redefine command "xsubr"? (y or n) [answered Y; input not from terminal]
Redefine command "xchartable"? (y or n) [answered Y; input not from terminal]
Redefine command "xsubchartable"? (y or n) [answered Y; input not from terminal]
Redefine command "xboolvector"? (y or n) [answered Y; input not from terminal]
Redefine command "xbuffer"? (y or n) [answered Y; input not from terminal]
Redefine command "xhashtable"? (y or n) [answered Y; input not from terminal]
Redefine command "xcons"? (y or n) [answered Y; input not from terminal]
Redefine command "nextcons"? (y or n) [answered Y; input not from terminal]
Redefine command "xcar"? (y or n) [answered Y; input not from terminal]
Redefine command "xcdr"? (y or n) [answered Y; input not from terminal]
Redefine command "xlist"? (y or n) [answered Y; input not from terminal]
Redefine command "xfloat"? (y or n) [answered Y; input not from terminal]
Redefine command "xscrollbar"? (y or n) [answered Y; input not from terminal]
Redefine command "xpr"? (y or n) [answered Y; input not from terminal]
Redefine command "xprintstr"? (y or n) [answered Y; input not from terminal]
Redefine command "xprintsym"? (y or n) [answered Y; input not from terminal]
Redefine command "xcoding"? (y or n) [answered Y; input not from terminal]
Redefine command "xcharset"? (y or n) [answered Y; input not from terminal]
---Type <return> to continue, or q <return> to quit---
Redefine command "xfontset"? (y or n) [answered Y; input not from terminal]
Redefine command "xfont"? (y or n) [answered Y; input not from terminal]
Redefine command "xbacktrace"? (y or n) [answered Y; input not from terminal]
Redefine command "xprintbytestr"? (y or n) [answered Y; input not from terminal]
Redefine command "xwhichsymbols"? (y or n) [answered Y; input not from terminal]
Redefine command "hookpost-backtrace"? (y or n) [answered Y; input not from terminal]
Redefine command "ff"? (y or n) [answered Y; input not from terminal]
DISPLAY = :0
TERM = dumb
Breakpoint 3 at 0x812e7a0: file emacs.c, line 363.
Temporary breakpoint 4 at 0x81476b0: file sysdep.c, line 1071.
(gdb) b Flogcount
Breakpoint 5 at 0x818bf10: file data.c, line 3078.
(gdb) r -Q
Starting program: /home/redknight/git/emacs/src/bootstrap-emacs -Q
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
[New Thread 0xb630ab70 (LWP 32328)]
[New Thread 0xb5bd1b70 (LWP 32329)]
[New Thread 0xb5657b70 (LWP 32330)]

Breakpoint 5, Flogcount (value=38910) at data.c:3078
3078	{
(gdb) bt
#0  Flogcount (value=38910) at data.c:3078
#1  0x081a1bdd in eval_sub (form=form@entry=143562403) at eval.c:2231
#2  0x081a4448 in Feval (form=143562403, lexical=0) at eval.c:2051
#3  0x081a24d4 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0xbfffede4)
    at eval.c:2766
#4  0x081d7407 in exec_byte_code (bytestr=<optimized out>, vector=137612637,
    maxdepth=66, args_template=args_template@entry=1030, nargs=nargs@entry=1,
    args=<optimized out>, args@entry=0xbfffef5c) at bytecode.c:629
#5  0x081a21ff in funcall_lambda (fun=137612597, nargs=nargs@entry=1,
    arg_vector=arg_vector@entry=0xbfffef5c) at eval.c:2967
#6  0x081a2453 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbfffef58)
    at eval.c:2780
#7  0x081d7407 in exec_byte_code (bytestr=<optimized out>, vector=137612973,
    maxdepth=18, args_template=args_template@entry=1030, nargs=nargs@entry=1,
    args=<optimized out>, args@entry=0xbffff0bc) at bytecode.c:629
#8  0x081a21ff in funcall_lambda (fun=137612925, nargs=nargs@entry=1,
    arg_vector=arg_vector@entry=0xbffff0bc) at eval.c:2967
#9  0x081a2453 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbffff0b8)
    at eval.c:2780
#10 0x081d7407 in exec_byte_code (bytestr=<optimized out>, vector=137611573,
    maxdepth=14, args_template=args_template@entry=1026, nargs=nargs@entry=1,
    args=<optimized out>, args@entry=0xbffff278) at bytecode.c:629
#11 0x081a21ff in funcall_lambda (fun=137611525, nargs=nargs@entry=1,
---Type <return> to continue, or q <return> to quit---
    arg_vector=arg_vector@entry=0xbffff278) at eval.c:2967
#12 0x081a2453 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbffff274)
    at eval.c:2780
#13 0x0819e8b4 in Ffuncall_interactively (nargs=2, args=0xbffff274)
    at callint.c:252
#14 0x081a24d4 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0xbffff270)
    at eval.c:2766
#15 0x0819f2f1 in Fcall_interactively (function=4798944, record_flag=0,
    keys=139307989) at callint.c:841
#16 0x081a24d4 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0xbffff3bc)
    at eval.c:2766
#17 0x081d7407 in exec_byte_code (bytestr=<optimized out>, vector=137301917,
    maxdepth=54, args_template=args_template@entry=4102, nargs=nargs@entry=1,
    args=<optimized out>, args@entry=0xbffff5bc) at bytecode.c:629
#18 0x081a21ff in funcall_lambda (fun=137301877, nargs=nargs@entry=1,
    arg_vector=arg_vector@entry=0xbffff5bc) at eval.c:2967
#19 0x081a2453 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbffff5b8)
    at eval.c:2780
#20 0x081a28d7 in call1 (fn=fn@entry=8064, arg1=4798944) at eval.c:2617
#21 0x0813c7f3 in command_loop_1 () at keyboard.c:1482
#22 0x081a0e30 in internal_condition_case (
    bfun=bfun@entry=0x813c460 <command_loop_1>,
    handlers=handlers@entry=10536, hfun=hfun@entry=0x8132790 <cmd_error>)
---Type <return> to continue, or q <return> to quit---
    at eval.c:1332
#23 0x081316a4 in command_loop_2 (ignore=ignore@entry=0) at keyboard.c:1110
#24 0x081a0ebd in internal_catch (tag=tag@entry=25488,
    func=func@entry=0x8131680 <command_loop_2>, arg=arg@entry=0)
    at eval.c:1097
#25 0x08131661 in command_loop () at keyboard.c:1089
#26 0x081323b3 in recursive_edit_1 () at keyboard.c:695
#27 0x081326b4 in Frecursive_edit () at keyboard.c:766
#28 0x0805c513 in main (argc=2, argv=0xbffff914) at emacs.c:1713

Lisp Backtrace:
"logcount" (0xbfffed00)
"eval" (0xbfffede8)
"elisp--eval-last-sexp" (0xbfffef5c)
"eval-last-sexp" (0xbffff0bc)
"eval-print-last-sexp" (0xbffff278)
"funcall-interactively" (0xbffff274)
"call-interactively" (0xbffff3c0)
"command-execute" (0xbffff5bc)
(gdb) disas
Dump of assembler code for function Flogcount:
=> 0x0818bf10 <+0>:	sub    $0x1c,%esp
   0x0818bf13 <+3>:	mov    0x20(%esp),%eax
   0x0818bf17 <+7>:	mov    %eax,%edx
   0x0818bf19 <+9>:	and    $0x3,%edx
   0x0818bf1c <+12>:	cmp    $0x2,%edx
   0x0818bf1f <+15>:	jne    0x818bf3e <Flogcount+46>
   0x0818bf21 <+17>:	mov    %eax,%edx
   0x0818bf23 <+19>:	sar    $0x2,%edx
   0x0818bf26 <+22>:	sar    $0x1f,%eax
   0x0818bf29 <+25>:	xor    %eax,%edx
   0x0818bf2b <+27>:	mov    %edx,(%esp)
   0x0818bf2e <+30>:	call   0x822ede0 <__popcountsi2>
   0x0818bf33 <+35>:	add    $0x1c,%esp
   0x0818bf36 <+38>:	lea    0x2(,%eax,4),%eax
   0x0818bf3d <+45>:	ret
   0x0818bf3e <+46>:	mov    %eax,0x4(%esp)
   0x0818bf42 <+50>:	movl   $0x3c00,(%esp)
   0x0818bf49 <+57>:	call   0x818bcb0 <wrong_type_argument>
End of assembler dump.
(gdb) fin
Dump of assembler code for function Flogcount:
=> 0x0818bf10 <+0>:	sub    $0x1c,%esp
   0x0818bf13 <+3>:	mov    0x20(%esp),%eax
   0x0818bf17 <+7>:	mov    %eax,%edx
   0x0818bf19 <+9>:	and    $0x3,%edx
   0x0818bf1c <+12>:	cmp    $0x2,%edx
   0x0818bf1f <+15>:	jne    0x818bf3e <Flogcount+46>
   0x0818bf21 <+17>:	mov    %eax,%edx
   0x0818bf23 <+19>:	sar    $0x2,%edx
   0x0818bf26 <+22>:	sar    $0x1f,%eax
   0x0818bf29 <+25>:	xor    %eax,%edx
   0x0818bf2b <+27>:	mov    %edx,(%esp)
   0x0818bf2e <+30>:	call   0x822ede0 <__popcountsi2>
   0x0818bf33 <+35>:	add    $0x1c,%esp
   0x0818bf36 <+38>:	lea    0x2(,%eax,4),%eax
   0x0818bf3d <+45>:	ret
   0x0818bf3e <+46>:	mov    %eax,0x4(%esp)
   0x0818bf42 <+50>:	movl   $0x3c00,(%esp)
   0x0818bf49 <+57>:	call   0x818bcb0 <wrong_type_argument>
End of assembler dump.
(gdb) fin
Run till exit from #0  Flogcount (value=38910) at data.c:3078
0x081a1bdd in eval_sub (form=form@entry=143562403) at eval.c:2231
2231                  val = (XSUBR (fun)->function.a1 (argvals[0]));
Value returned is $1 = 46
(gdb) cont
Continuing.

Breakpoint 5, Flogcount (value=39998) at data.c:3078
3078	{
(gdb) fin
Run till exit from #0  Flogcount (value=39998) at data.c:3078
0x081a1bdd in eval_sub (form=form@entry=143591699) at eval.c:2231
2231                  val = (XSUBR (fun)->function.a1 (argvals[0]));
Value returned is $2 = 34
(gdb)

[-- Attachment #3: Type: text/plain, Size: 226 bytes --]


---------- Snip ------------

    >Value returned is $2 = make_number(8)

I get "Value returned is $2 = 34".

I'm sort of at the extreme limit my IT understanding level, so I may
have messed up - sorry.

Best wishes,

Colin.

  reply	other threads:[~2017-10-24 17:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 10:07 data-tests-logcount Failure Colin Baxter
2017-10-24 16:02 ` Paul Eggert
2017-10-24 17:43   ` Colin Baxter [this message]
2017-10-24 18:02     ` Paul Eggert
2017-10-24 19:01       ` Colin Baxter
2017-10-24 19:17         ` Paul Eggert

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=87mv4go301.fsf@yandex.com \
    --to=m43cap@yandex.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=mvoteiza@udel.edu \
    /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).