From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.devel Subject: Re: data-tests-logcount Failure Date: Tue, 24 Oct 2017 18:43:42 +0100 Message-ID: <87mv4go301.fsf@yandex.com> References: <87o9owg8ow.fsf@yandex.com> <7b839a97-dee5-2930-4c6d-a3c36a91a235@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1508867057 28244 195.159.176.226 (24 Oct 2017 17:44:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 24 Oct 2017 17:44:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: Mark Oteiza , , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 24 19:44:08 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e73F6-0004iX-9d for ged-emacs-devel@m.gmane.org; Tue, 24 Oct 2017 19:43:56 +0200 Original-Received: from localhost ([::1]:44963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e73FD-00036I-P3 for ged-emacs-devel@m.gmane.org; Tue, 24 Oct 2017 13:44:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e73F4-00036A-Ui for emacs-devel@gnu.org; Tue, 24 Oct 2017 13:43:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e73F1-0005Mp-L8 for emacs-devel@gnu.org; Tue, 24 Oct 2017 13:43:54 -0400 Original-Received: from forward100j.mail.yandex.net ([5.45.198.240]:40706) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e73F1-0005L2-0N for emacs-devel@gnu.org; Tue, 24 Oct 2017 13:43:51 -0400 Original-Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward100j.mail.yandex.net (Yandex) with ESMTP id D62F95D84903; Tue, 24 Oct 2017 20:43:45 +0300 (MSK) Original-Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id PwYb6josOx-hj7iinKv; Tue, 24 Oct 2017 20:43:45 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1508867025; bh=yxVuf8u1A5Qe/ppncQCqh4VzfBu2T6d64dB1YXOwahA=; h=From:To:Cc:Cc:Subject:References:Date:In-Reply-To:Message-ID; b=aD76KHWg9KnlA0RY4368cg0JsBg7KuRw5S1qmyXld4rNgwOvKNqm6H7KZLT0PrixN 6uNtYAJ4BknlXRoT0yy1BQMI9wOs2OGXZh7SiosEaCS0u6nMZnmzDR58ChbDK5DJ0Z 3bosCLXjjOpvwgsER8w01NjglNoouE9AC+YN0paw= Original-Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id itx7DkXY6V-hhPOTDhl; Tue, 24 Oct 2017 20:43:43 +0300 (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1508867024; bh=yxVuf8u1A5Qe/ppncQCqh4VzfBu2T6d64dB1YXOwahA=; h=From:To:Cc:Cc:Subject:References:Date:In-Reply-To:Message-ID; b=LkI1zSIvBe9Pk3DxBh8t3dU7DtyN7bBGzU70Uk8uHNenvecVug0fajtf2k5k5PSnJ sNSPPIWN+eTbkqC8S1U/5A8MijpaDaX3MhiotQSjE3h0EIkgGejOvJPQDklWHm8EIj NevZTPR0eIecBBszsa8EPJOaZ8xdcPR0DkV6R4r4= Authentication-Results: smtp1p.mail.yandex.net; dkim=pass header.i=@yandex.com X-Face: -P+89ASh_wrs;AUGm`!l[}/o-lyK}5W.gq\fkJ{#d6Gu,hWrZNz::iMm5PJb} __A96]-LUrl)X=uF=V|\3-\9/sXvBs/H In-Reply-To: <7b839a97-dee5-2930-4c6d-a3c36a91a235@cs.ucla.edu> (Paul Eggert's message of "Tue, 24 Oct 2017 09:02:34 -0700") Face: iVBORw0KGgoAAAANSUhEUgAAACwAAAAMCAIAAACWSshgAAAABmJLR0QA/wD/AP+gvaeTAAAA q0lEQVQ4je3UsQ1CMRADUOfuPisgUUIHM1Ayxx+WGaCjRWIGiE0DiNIp6Ej9dHESK+2wntEajHVd Xk7boyMB7M771W1jUakiKlo4ODORZgZkZsXkSIpVMZkhIhPW2Bf2Q1jb/3oVRUAOFYnuzhVJWZpS SZ2w7kPCQAiBoicZ1iW8/YC1sYDBYi7cCP9ifuGhYrLD+jEljRRT3SsmpKLukvUo5sk+uPPhyAY+ AY/zZeWqEtDJAAAAAElFTkSuQmCC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 5.45.198.240 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219724 Archived-At: --=-=-= Content-Type: text/plain >>>>> Paul Eggert 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: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=shell_output.txt Content-Description: gdb output 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 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: ... 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 to continue, or q 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 to continue, or q 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 to continue, or q 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=, vector=137612637, maxdepth=66, args_template=args_template@entry=1030, nargs=nargs@entry=1, args=, 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=, vector=137612973, maxdepth=18, args_template=args_template@entry=1030, nargs=nargs@entry=1, args=, 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=, vector=137611573, maxdepth=14, args_template=args_template@entry=1026, nargs=nargs@entry=1, args=, args@entry=0xbffff278) at bytecode.c:629 #11 0x081a21ff in funcall_lambda (fun=137611525, nargs=nargs@entry=1, ---Type to continue, or q 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=, vector=137301917, maxdepth=54, args_template=args_template@entry=4102, nargs=nargs@entry=1, args=, 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 , handlers=handlers@entry=10536, hfun=hfun@entry=0x8132790 ) ---Type to continue, or q 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 , 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 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 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 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 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) --=-=-= Content-Type: text/plain ---------- 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. --=-=-=--