lmi
[Top][All Lists]
Advanced

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

Re: [lmi] [PATCH] C++ m11n: range-based for loops


From: Greg Chicares
Subject: Re: [lmi] [PATCH] C++ m11n: range-based for loops
Date: Fri, 13 Jan 2017 11:39:50 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1

On 2017-01-11 22:39, Vadim Zeitlin wrote:
[...]
>               https://github.com/vadz/lmi/pull/52
> 
>  As the description of this PR indicates, the first commit (see
> https://github.com/vadz/lmi/pull/52/commits/d1fd3ae2e2) contains mostly
> changes done automatically by clang-tidy (with a few "auto"s added manually
> by me and a few typedefs not necessary any more removed), while the second
> one (https://github.com/vadz/lmi/pull/52/commits/6afb131f2d5) contains only
> the changes done manually, so while it's smaller, it probably merits more
> detailed review.

As a preliminary step, I applied only the first of those two commits
("mostly changes done automatically by clang-tidy") and ran all my usual
tests. The unit tests are fine, but 'make system_test' pagefaulted on
about a dozen out of about a hundred testdecks. There's a large testdeck
with a couple hundred cells that use the 'sample' product only, but that
one passes--so it's likely that reproducing this problem requires some
proprietary product files that you don't have.

I've isolated one tiny (proprietary) testdeck that reproduces the
problem repeatably, producing the 'wine' output below. First, let's
try decoding the backtrace--I guess we want one of the two highlighted
addresses:
  Backtrace:
  =>0 0x00774e16 in liblmi (+0x94e16) (0x006dcd48)
      ^^^^^^^^^^                       ^^^^^^^^^^
and either the dll or the program that invoked it; the cardinality of
the cartesian product being only four, we try brute force:

/opt/lmi/src/lmi[0]$i686-w64-mingw32-addr2line -e 
/opt/lmi/bin/lmi_cli_shared.exe 0x774e16
??:0
/opt/lmi/src/lmi[0]$i686-w64-mingw32-addr2line -e /opt/lmi/bin/liblmi.dll 
0x774e16
??:0
/opt/lmi/src/lmi[0]$i686-w64-mingw32-addr2line -e 
/opt/lmi/bin/lmi_cli_shared.exe 0x006dcd48
??:0
/opt/lmi/src/lmi[0]$i686-w64-mingw32-addr2line -e /opt/lmi/bin/liblmi.dll 
0x006dcd48
??:0

Maybe I have gdb in this chroot:
  $whence gdb
No, I don't; and no 'i686-w64-mingw32-gdb' either.

Now I could boot up an msw VM and run this under cygwin, but that
environment is balky and crash-prone. Let's try enabling everything
the wine debugger offers:
  $WINEDEBUG=+all make $coefficiency system_test 
testdecks=/opt/lmi/test/14g.cns >../log 2>&1
Hmm...that dumped a seemingly infinite amount of output into another
terminal that was already open. I killed it after about fifteen
minutes. Now let's try a more selective setting:
  WINEDEBUG=+relay make $coefficiency system_test 
testdecks=/opt/lmi/test/14g.cns >../log 2>&1
I was about to kill that when it finally ended.
  $ls -l /opt/lmi/src/log
  -rw-r--r-- 1 greg greg 6441071022 Jan 13 11:13 /opt/lmi/src/log
That's okay, my SSD has a five-year guarantee, and that file only
took six percent of all the space I've ever used on it. I looked
for /CHANNEL/ as suggested here:
  https://www.winehq.org/docs/winedev-guide/wine-debugger
but it was not found. I inspected the last BIGNUM screens' worth
in 'less', but there was no indication of any error.

By now I would probably have found the problem if I had followed
my inclination to revert changes selectively, iteratively rebuilding
and retesting. There are 49 changed files, but many of the
corresponding object files aren't even linked into the binaries that
fail, and others are less likely candidates because their unit tests
pass, so this isn't necessarily too laborious. I'll send this email
off now and then try that after the morning's dog routine.

Anyway, here's that wine-debugger dump:

Unhandled exception: page fault on read access to 0x00000000 in 32-bit code 
(0x00774e16).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:00774e16 ESP:006dc880 EBP:006dcd48 EFLAGS:00010202(  R- --  I   - - - )
 EAX:00000000 EBX:006dcb24 ECX:006dc770 EDX:7ffd8000
 ESI:00000000 EDI:0011ec20
Stack dump:
0x006dc880:  00000000 006dcb24 006dcbd8 00000000
0x006dc890:  006dc99c 002a3af0 7b826a79 7b873ecb
0x006dc8a0:  006dc8b0 006dc8bc 00000000 00127fb8
0x006dc8b0:  566a0680 01d26d86 00650065 000107e1
0x006dc8c0:  000a000d 00090012 00050000 e3122000
0x006dc8d0:  006dc8f0 566a0680 006dc958 00000001
Backtrace:
=>0 0x00774e16 in liblmi (+0x94e16) (0x006dcd48)
  1 0x00778535 in liblmi (+0x98534) (0x006dd258)
  2 0x00778f9f in liblmi (+0x98f9e) (0x006dd2f8)
  3 0x0077a570 in liblmi (+0x9a56f) (0x006df2e8)
  4 0x00406c01 in lmi_cli_shared (+0x6c00) (0x006dfcf8)
  5 0x004077ad in lmi_cli_shared (+0x77ac) (0x006dfd18)
  6 0x004112a0 in lmi_cli_shared (+0x1129f) (0x006dfd88)
  7 0x004013e2 in lmi_cli_shared (+0x13e1) (0x006dfe50)
  8 0x7b85a9bc call_process_entry+0xb() in kernel32 (0x006dfe68)
  9 0x7b85b9ca in kernel32 (+0x4b9c9) (0x006dfe98)
  10 0x7bc72f60 call_thread_func_wrapper+0xb() in ntdll (0x006dfeb8)
  11 0x7bc75d7f call_thread_func+0xce() in ntdll (0x006dffa8)
  12 0x7bc72f3e RtlRaiseException+0x21() in ntdll (0x006dffc8)
  13 0x7bc4acf7 call_dll_entry_point+0x776() in ntdll (0x006dffe8)
  14 0xf75463ad wine_call_on_stack+0x1c() in libwine.so.1 (0x00000000)
  15 0xf7546510 wine_switch_to_stack+0x1f() in libwine.so.1 (0xffc75aa8)
  16 0x7bc5020a LdrInitializeThunk+0x339() in ntdll (0xffc75b08)
  17 0x7b861613 __wine_kernel_init+0x872() in kernel32 (0xffc76c68)
  18 0x7bc50783 __wine_process_init+0x162() in ntdll (0xffc76cd8)
  19 0xf7543ff3 wine_init+0x2b2() in libwine.so.1 (0xffc76d28)
  20 0x7bf00d52 main+0x81() in <wine-loader> (0xffc77178)
  21 0xf7380a63 __libc_start_main+0xf2() in libc.so.6 (0x00000000)
0x00774e16: movl        0x0(%eax),%eax
Modules:
Module  Address                 Debug info      Name (50 modules)
PE        400000-  4d2000       Dwarf           lmi_cli_shared
PE        6e0000- 340c000       Dwarf           liblmi
PE      62040000-6212c000       Deferred        libxslt-1
PE      6d0c0000-6d137000       Deferred        libgcc_s_sjlj-1
PE      6d600000-6d662000       Deferred        libexslt-0
PE      6fe40000-703d4000       Deferred        libstdc++-6
PE      71140000-71574000       Deferred        libxml2-2
ELF     7b800000-7ba55000       Dwarf           kernel32<elf>
  \-PE  7b810000-7ba55000       \               kernel32
ELF     7bc00000-7bcd6000       Dwarf           ntdll<elf>
  \-PE  7bc10000-7bcd6000       \               ntdll
ELF     7bf00000-7bf04000       Dwarf           <wine-loader>
ELF     7e852000-7e859000       Deferred        libxfixes.so.3
ELF     7e859000-7e865000       Deferred        libxcursor.so.1
ELF     7e865000-7e878000       Deferred        libxi.so.6
ELF     7e878000-7e884000       Deferred        libxrender.so.1
ELF     7e884000-7e88b000       Deferred        libxxf86vm.so.1
ELF     7e88b000-7e891000       Deferred        libxdmcp.so.6
ELF     7e891000-7e895000       Deferred        libxau.so.6
ELF     7e895000-7e8bb000       Deferred        libxcb.so.1
ELF     7e8bb000-7ea0d000       Deferred        libx11.so.6
ELF     7ea0d000-7ea22000       Deferred        libxext.so.6
ELF     7ea22000-7eaaf000       Deferred        winex11<elf>
  \-PE  7ea30000-7eaaf000       \               winex11
ELF     7eaaf000-7eadc000       Deferred        libpng12.so.0
ELF     7eadc000-7eaf9000       Deferred        libz.so.1
ELF     7eaf9000-7ebab000       Deferred        libfreetype.so.6
ELF     7ebab000-7ebe0000       Deferred        ws2_32<elf>
  \-PE  7ebb0000-7ebe0000       \               ws2_32
ELF     7ebe0000-7ebf9000       Deferred        version<elf>
  \-PE  7ebf0000-7ebf9000       \               version
ELF     7ebf9000-7ec67000       Deferred        advapi32<elf>
  \-PE  7ec10000-7ec67000       \               advapi32
ELF     7ec67000-7ed81000       Deferred        gdi32<elf>
  \-PE  7ec70000-7ed81000       \               gdi32
ELF     7ed81000-7eecf000       Deferred        user32<elf>
  \-PE  7ed90000-7eecf000       \               user32
ELF     7eecf000-7ef7c000       Deferred        msvcrt<elf>
  \-PE  7eee0000-7ef7c000       \               msvcrt
ELF     7ef7c000-7ef89000       Deferred        libnss_files.so.2
ELF     7ef89000-7ef95000       Deferred        libnss_nis.so.2
ELF     7ef95000-7efae000       Deferred        libnsl.so.1
ELF     7efae000-7eff4000       Deferred        libm.so.6
ELF     7eff7000-7f000000       Deferred        libnss_compat.so.2
ELF     f7362000-f7367000       Deferred        libdl.so.2
ELF     f7367000-f7514000       Dwarf           libc.so.6
ELF     f7515000-f7531000       Deferred        libpthread.so.0
ELF     f753d000-f76f2000       Dwarf           libwine.so.1
ELF     f76f4000-f7715000       Deferred        ld-linux.so.2
ELF     f7715000-f7716000       Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
00000008 [REDACTED]
        0000004d    0
        00000065    0
        00000009    0
0000000e services.exe
        00000020    0
        0000001f    0
        00000014    0
        00000010    0
        0000000f    0
00000012 winedevice.exe
        00000019    0
        00000017    0
        00000013    0
0000001a plugplay.exe
        00000022    0
        00000021    0
        0000001b    0
00000024 explorer.exe
        00000026    0
        00000025    0
00000029 (D) Z:\opt\lmi\bin\lmi_cli_shared.exe
        0000002a    0 <==
0000004b explorer.exe
        000000d8    0
        000000a1    0
System information:
    Wine build: wine-1.6.2
    Platform: i386
    Host system: Linux
    Host version: 3.2.0-4-amd64




reply via email to

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