From: Paul Eggert <eggert@cs.ucla.edu>
To: Colin Baxter <m43cap@yandex.com>
Cc: Mark Oteiza <mvoteiza@udel.edu>, emacs-devel@gnu.org
Subject: Re: data-tests-logcount Failure
Date: Tue, 24 Oct 2017 09:02:34 -0700 [thread overview]
Message-ID: <7b839a97-dee5-2930-4c6d-a3c36a91a235@cs.ucla.edu> (raw)
In-Reply-To: <87o9owg8ow.fsf@yandex.com>
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'?
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? I did that on Fedora
26 x86-64 on AMD Phenom II X4 910e, configured with
'PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure
CC="/usr/bin/gcc -m32 -march=native -fsanitize=undefined
-static-libubsan" --enable-gcc-warnings --without-imagemagick
--with-modules', and got the following. What do you get when you try the
same thing with your configuration?
$ gdb bootstrap-emacs
(gdb) source .gdbinit
(gdb) b Flogcount
(gdb) r -Q
[In the *scratch* buffer, type "(logcount 9727) C-j".]
Breakpoint 3, Flogcount (value=make_number(9727)) at data.c:3078
(gdb) bt
#0 Flogcount (value=make_number(9727)) at data.c:3078
...
(gdb) disas
Dump of assembler code for function Flogcount:
=> 0x08184080 <+0>: sub $0xc,%esp
0x08184083 <+3>: mov 0x14(%esp),%edx
0x08184087 <+7>: mov 0x10(%esp),%eax
0x0818408b <+11>: mov %edx,%ecx
0x0818408d <+13>: and $0x3,%ecx
0x08184090 <+16>: cmp $0x2,%ecx
0x08184093 <+19>: jne 0x81840b2 <Flogcount+50>
0x08184095 <+21>: mov %edx,%ecx
0x08184097 <+23>: sar $0x1f,%edx
0x0818409a <+26>: sar $0x2,%ecx
0x0818409d <+29>: xor %edx,%ecx
0x0818409f <+31>: popcnt %ecx,%ecx
0x081840a3 <+35>: lea 0x2(,%ecx,4),%edx
0x081840aa <+42>: mov %edx,(%eax)
0x081840ac <+44>: add $0xc,%esp
0x081840af <+47>: ret $0x4
0x081840b2 <+50>: push %eax
0x081840b3 <+51>: push %eax
0x081840b4 <+52>: push %edx
0x081840b5 <+53>: push $0x3b40
0x081840ba <+58>: call 0x8183020 <wrong_type_argument>
End of assembler dump.
(gdb) fin
Run till exit from #0 Flogcount (value=make_number(9727)) at
data.c:3078
0x0819ceaf in eval_sub (form=...) at eval.c:2234
Value returned is $1 = make_number(11)
(gdb) cont
Continuing.
[In the *scratch* buffer, type "(logcount 9999) C-j".]
Breakpoint 3, Flogcount (value=make_number(9999)) at data.c:3078
(gdb) fin
Run till exit from #0 Flogcount (value=make_number(9999)) at
data.c:3078
0x0819ceaf in eval_sub (form=...) at eval.c:2234
Value returned is $2 = make_number(8)
My /proc/cpuinfo looks like this, repeated once for each core:
processor : 0
vendor_id : AuthenticAMD
cpu family : 16
model : 4
model name : AMD Phenom(tm) II X4 910e Processor
stepping : 3
microcode : 0x10000c8
cpu MHz : 2608.807
cache size : 512 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
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 mmx fxsr sse sse2 ht syscall nx mmxext
fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl
nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy
svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs
null_seg amd_e400
bogomips : 5217.61
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
next prev parent reply other threads:[~2017-10-24 16:02 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 [this message]
2017-10-24 17:43 ` Colin Baxter
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=7b839a97-dee5-2930-4c6d-a3c36a91a235@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=m43cap@yandex.com \
--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).