emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: data-tests-logcount Failure


From: Paul Eggert
Subject: Re: data-tests-logcount Failure
Date: Tue, 24 Oct 2017 09:02:34 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]