Bug#915333: git-annex: Illegal Instruction on armel (Fujitsu Q700 like QNAP TS-21x/TS-22x)

Bernhard Übelacker bernhardu at mailbox.org
Thu Jan 31 19:12:17 GMT 2019


Hello Everyone,
I own a qnap ts-119pII with a similar cpu.

See attached file with several debugging attempts.

With my limited assembly knowledge I got to this instruction,
where the backtrace command still shows all of the stack:

    (gdb) bt
    #0  0x03718a2c in stg_returnToStackTop$def ()
    #1  0x03700118 in schedule ()
    #2  0x03701670 in scheduleWaitThread ()
    #3  0x037183a8 in ioManagerStart ()
    #4  0x036fe9ac in hs_init_ghc ()
    #5  0x0370df40 in hs_main ()
    #6  0x0000d838 in main (argc=2, argv=0xbefff6c4) at /tmp/ghc23822_0/ghc_295.c:9

Then execution continues in stg_enter_info$def and stg_ap_v_info$def.
In the latter following instruction is reached:

    0x0371ef80 in stg_ap_v_info$def ()
    1: x/i $pc
    => 0x371ef80 <stg_ap_v_info$def+292>:   ldrsh   r2, [r0, #-10]
    (gdb) nexti
    0x0371ef84 in stg_ap_v_info$def ()
    1: x/i $pc
    => 0x371ef84 <stg_ap_v_info$def+296>:   uxth    r1, r2
    (gdb) nexti

    Thread 1 "git-annex" received signal SIGILL, Illegal instruction.
    0x0371ef84 in stg_ap_v_info$def ()
    1: x/i $pc
    => 0x371ef84 <stg_ap_v_info$def+296>:   uxth    r1, r2
    (gdb) bt
    #0  0x0371ef84 in stg_ap_v_info$def ()
    #1  0x03700118 in schedule ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)

If I read [1] right, then the UXTH instruction is just supported
on ARMv6 or later.

Kind regards,
Bernhard

[1] http://infocenter.arm.com/help/topic/com.arm.doc.dui0489i/CIHHJCFE.html
-------------- next part --------------


apt install systemd-coredump gdb
export PKG="git-annex git-annex-dbgsym"; apt install $PKG; apt-mark auto $PKG
export PKG="dpkg-dev devscripts"; apt install $PKG; apt-mark auto $PKG
# apt build-dep git-annex


mkdir source/git-annex/orig -p
cd    source/git-annex/orig
apt source git-annex
cd



mkdir source/ghc/orig -p
cd    source/ghc/orig
apt source ghc
cd





root at debian:~# uname -a
Linux debian 4.19.0-1-marvell #1 Debian 4.19.12-1 (2018-12-22) armv5tel GNU/Linux


root at debian:~# dpkg -l | grep git-annex
ii  git-annex                        7.20190122-2                armel        manage files with git, without checking their contents into git


benutzer at debian:~$ git-annex --help
Ungültiger Maschinenbefehl (Speicherabzug geschrieben)


root at debian:~# coredumpctl list
TIME                            PID   UID   GID SIG COREFILE  EXE
Thu 2019-01-31 19:08:59 CET    1615  1001  1001   4 present   /usr/bin/git-annex


root at debian:~# coredumpctl gdb 1615
           PID: 1615 (git-annex)
           UID: 1001 (benutzer)
           GID: 1001 (benutzer)
        Signal: 4 (ILL)
     Timestamp: Thu 2019-01-31 19:08:58 CET (2min 23s ago)
  Command Line: git-annex --help
    Executable: /usr/bin/git-annex
 Control Group: /user.slice/user-1001.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1001.slice
       Session: 3
     Owner UID: 1001 (benutzer)
       Boot ID: 170c7ed05d0d4de4949a63c6e890ae0b
    Machine ID: d2fd6eda07e4485089c59680615933f6
      Hostname: debian
       Storage: /var/lib/systemd/coredump/core.git-annex.1001.170c7ed05d0d4de4949a63c6e890ae0b.1615.1548958138000000.lz4
       Message: Process 1615 (git-annex) of user 1001 dumped core.
                
                Stack trace of thread 1615:
                #0  0x000000000371ef84 n/a (git-annex)

GNU gdb (Debian 8.2-1) 8.2
Copyright (C) 2018 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 "arm-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/git-annex...Reading symbols from /usr/lib/debug/.build-id/2e/b84d9cee7f3bfd1e0f737e7714c5ac7fc3ba48.debug...done.
done.
[New LWP 1615]
[New LWP 1616]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".
Core was generated by `git-annex --help'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x0371ef84 in stg_ap_v_info$def ()
[Current thread is 1 (Thread 0xb6f1f830 (LWP 1615))]
(gdb) bt
#0  0x0371ef84 in stg_ap_v_info$def ()
#1  0x03700118 in schedule ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)




benutzer at debian:~$ gdb -q -ex 'set width 0' -ex 'set pagination off' --args git-annex --help
Reading symbols from git-annex...Reading symbols from /usr/lib/debug/.build-id/2e/b84d9cee7f3bfd1e0f737e7714c5ac7fc3ba48.debug...done.
done.
(gdb) b main
Breakpoint 1 at 0xd79c: file /tmp/ghc23822_0/ghc_295.c, line 5.
(gdb) run
Starting program: /usr/bin/git-annex --help
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".

Breakpoint 1, main (argc=2, argv=0xbefff714) at /tmp/ghc23822_0/ghc_295.c:5
5       /tmp/ghc23822_0/ghc_295.c: Datei oder Verzeichnis nicht gefunden.
(gdb) next
6       in /tmp/ghc23822_0/ghc_295.c
(gdb) 
8       in /tmp/ghc23822_0/ghc_295.c
(gdb) 
9       in /tmp/ghc23822_0/ghc_295.c
(gdb) 
[New Thread 0xb42ff450 (LWP 1679)]

Thread 1 "git-annex" received signal SIGILL, Illegal instruction.
0x0371ef84 in stg_ap_v_info$def ()
(gdb) bt
#0  0x0371ef84 in stg_ap_v_info$def ()
#1  0x03700118 in schedule ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) kill
Kill the program being debugged? (y or n) y
[Inferior 1 (process 1680) killed]
(gdb) q




(gdb) b ghc_295.c:9
Breakpoint 2 at 0xd7f8: file /tmp/ghc23822_0/ghc_295.c, line 9.





gdb -q \
    -ex 'set width 0' \
    -ex 'set pagination off' \
    -ex 'display/i $pc' \
    -ex 'b main' \
    -ex 'run' \
    -ex 'dele 1' \
    -ex 'print schedule+1480' \
    -ex 'b *$1' \
    -ex 'cont' \
    -ex 'stepi' \
    -ex 'bt' \
    --args git-annex --help

hs_main+76
hs_init_ghc+520
ioManagerStart+88
scheduleWaitThread+152
schedule+1480



benutzer at debian:~$ gdb -q \
>     -ex 'set width 0' \
>     -ex 'set pagination off' \
>     -ex 'display/i $pc' \
>     -ex 'b main' \
>     -ex 'run' \
>     -ex 'dele 1' \
>     -ex 'print schedule+1480' \
>     -ex 'b *$1' \
>     -ex 'cont' \
>     -ex 'stepi' \
>     -ex 'bt' \
>     --args git-annex --help
Reading symbols from git-annex...Reading symbols from /usr/lib/debug/.build-id/2e/b84d9cee7f3bfd1e0f737e7714c5ac7fc3ba48.debug...done.
done.
1: x/i $pc
<error: No registers.>
Breakpoint 1 at 0xd79c: file /tmp/ghc23822_0/ghc_295.c, line 5.
Starting program: /usr/bin/git-annex --help
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".

Breakpoint 1, main (argc=2, argv=0xbefff714) at /tmp/ghc23822_0/ghc_295.c:5
5       /tmp/ghc23822_0/ghc_295.c: Datei oder Verzeichnis nicht gefunden.
1: x/i $pc
=> 0xd79c <main>:       ldr     r5, [pc, #148]  ; 0xd838 <main+156>
$1 = (<text variable, no debug info> *) 0x3700114 <schedule+1480>
Breakpoint 2 at 0x3700114
Continuing.
[New Thread 0xb42ff450 (LWP 1936)]

Thread 1 "git-annex" hit Breakpoint 2, 0x03700114 in schedule ()
1: x/i $pc
=> 0x3700114 <schedule+1480>:   bl      0x37083c8 <StgRun>
0x037083c8 in StgRun ()
1: x/i $pc
=> 0x37083c8 <StgRun>:  push    {r4, r5, r6, r7, r8, r9, r10, lr}
#0  0x037083c8 in StgRun ()
#1  0x03700118 in schedule ()
#2  0x03701670 in scheduleWaitThread ()
#3  0x037183a8 in ioManagerStart ()
#4  0x036fe9ac in hs_init_ghc ()
#5  0x0370df40 in hs_main ()
#6  0x0000d838 in main (argc=2, argv=0xbefff714) at /tmp/ghc23822_0/ghc_295.c:9
(gdb) nexti
0x037083cc in StgRun ()
1: x/i $pc
=> 0x37083cc <StgRun+4>:        push    {r4, r5, r6, r7, r8, r9, r10, r11, r12, lr}
(gdb) 
0x037083d0 in StgRun ()
1: x/i $pc
=> 0x37083d0 <StgRun+8>:        sub     sp, sp, #8192   ; 0x2000
(gdb) 
0x037083d4 in StgRun ()
1: x/i $pc
=> 0x37083d4 <StgRun+12>:       mov     r4, r1
(gdb) 
0x037083d8 in StgRun ()
1: x/i $pc
=> 0x37083d8 <StgRun+16>:       bx      r0
(gdb) 
0x03718a1c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a1c <stg_returnToStackTop$def>:        ldr     r6, [r4, #812]  ; 0x32c
(gdb) 
0x03718a20 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a20 <stg_returnToStackTop$def+4>:      ldr     r3, [r4, #820]  ; 0x334
(gdb) 
0x03718a24 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a24 <stg_returnToStackTop$def+8>:      mov     r1, #0
(gdb) 
0x03718a28 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a28 <stg_returnToStackTop$def+12>:     ldr     r2, [r6, #12]
(gdb) 
0x03718a2c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a2c <stg_returnToStackTop$def+16>:     add     r11, r2, #100   ; 0x64
(gdb) 
0x03718a30 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a30 <stg_returnToStackTop$def+20>:     ldr     r5, [r2, #12]
(gdb) 
0x03718a34 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a34 <stg_returnToStackTop$def+24>:     str     r1, [r4, #828]  ; 0x33c
(gdb) 
0x03718a38 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a38 <stg_returnToStackTop$def+28>:     ldr     r1, [r3]
(gdb) 
0x03718a3c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a3c <stg_returnToStackTop$def+32>:     ldr     r0, [r3, #4]
(gdb) 
0x03718a40 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a40 <stg_returnToStackTop$def+36>:     ldr     r3, [r3, #28]
(gdb) 
0x03718a44 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a44 <stg_returnToStackTop$def+40>:     add     r3, r1, r3, lsl #12
(gdb) 
0x03718a48 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a48 <stg_returnToStackTop$def+44>:     sub     r3, r3, #1
(gdb) 
0x03718a4c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a4c <stg_returnToStackTop$def+48>:     str     r3, [r4, #804]  ; 0x324
(gdb) 
0x03718a50 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a50 <stg_returnToStackTop$def+52>:     ldrd    r8, [r6, #64]   ; 0x40
(gdb) 
0x03718a54 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a54 <stg_returnToStackTop$def+56>:     sub     r3, r0, r1
(gdb) 
0x03718a58 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a58 <stg_returnToStackTop$def+60>:     adds    r8, r8, r3
(gdb) 
0x03718a5c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a5c <stg_returnToStackTop$def+64>:     adc     r9, r9, #0
(gdb) 
0x03718a60 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a60 <stg_returnToStackTop$def+68>:     strd    r8, [r6, #64]   ; 0x40
(gdb) 
0x03718a64 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a64 <stg_returnToStackTop$def+72>:     sub     r6, r0, #4
(gdb) 
0x03718a68 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a68 <stg_returnToStackTop$def+76>:     ldr     r0, [r5]
(gdb) 
0x03718a6c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a6c <stg_returnToStackTop$def+80>:     bx      r0
(gdb) 
0x0371e0cc in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0cc <stg_enter_info$def>:      ldr     r7, [r5, #4]
(gdb) 
0x0371e0d0 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0d0 <stg_enter_info$def+4>:    tst     r7, #3
(gdb) 
0x0371e0d4 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0d4 <stg_enter_info$def+8>:    beq     0x371e0ec <stg_enter_info$def+32>
(gdb) 
0x0371e0ec in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0ec <stg_enter_info$def+32>:   ldr     r0, [r7]
(gdb) 
0x0371e0f0 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0f0 <stg_enter_info$def+36>:   ldrsh   r3, [r0, #-4]
(gdb) 
0x0371e0f4 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0f4 <stg_enter_info$def+40>:   sub     r2, r3, #27
(gdb) 
0x0371e0f8 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0f8 <stg_enter_info$def+44>:   cmp     r2, #2
(gdb) 
0x0371e0fc in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0fc <stg_enter_info$def+48>:   bcc     0x371e0dc <stg_enter_info$def+16>
(gdb) 
0x0371e100 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e100 <stg_enter_info$def+52>:   cmp     r3, #25
(gdb) 
0x0371e104 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e104 <stg_enter_info$def+56>:   bhi     0x371e124 <stg_enter_info$def+88>
(gdb) 
0x0371e108 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e108 <stg_enter_info$def+60>:   mov     r2, #32512      ; 0x7f00
(gdb) 
0x0371e10c in stg_enter_info$def ()
1: x/i $pc
=> 0x371e10c <stg_enter_info$def+64>:   mov     r1, #1
(gdb) 
0x0371e110 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e110 <stg_enter_info$def+68>:   orr     r2, r2, #41943040       ; 0x2800000
(gdb) 
0x0371e114 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e114 <stg_enter_info$def+72>:   tst     r2, r1, lsl r3
(gdb) 
0x0371e118 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e118 <stg_enter_info$def+76>:   beq     0x371e124 <stg_enter_info$def+88>
(gdb) 
0x0371e11c in stg_enter_info$def ()
1: x/i $pc
=> 0x371e11c <stg_enter_info$def+80>:   ldr     r0, [r5, #8]!
(gdb) 
0x0371e120 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e120 <stg_enter_info$def+84>:   bx      r0
(gdb) 
0x0371ee5c in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee5c <stg_ap_v_info$def>:       mov     r3, r6
(gdb) 
0x0371ee60 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee60 <stg_ap_v_info$def+4>:     b       0x371ee68 <stg_ap_v_info$def+12>
(gdb) 
0x0371ee68 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee68 <stg_ap_v_info$def+12>:    and     r6, r7, #3
(gdb) 
0x0371ee6c in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee6c <stg_ap_v_info$def+16>:    cmp     r6, #1
(gdb) 
0x0371ee70 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee70 <stg_ap_v_info$def+20>:    beq     0x371ef70 <stg_ap_v_info$def+276>
(gdb) 
0x0371ee74 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee74 <stg_ap_v_info$def+24>:    bic     r7, r7, #3
(gdb) 
0x0371ee78 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee78 <stg_ap_v_info$def+28>:    ldr     r0, [r7]
(gdb) 
0x0371ee7c in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee7c <stg_ap_v_info$def+32>:    ldrsh   r6, [r0, #-4]
(gdb) 
0x0371ee80 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee80 <stg_ap_v_info$def+36>:    sub     r6, r6, #8
(gdb) 
0x0371ee84 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee84 <stg_ap_v_info$def+40>:    cmp     r6, #50 ; 0x32
(gdb) 
0x0371ee88 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee88 <stg_ap_v_info$def+44>:    bhi     0x371f0c4 <stg_ap_v_info$def+616>
(gdb) 
0x0371ee8c in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee8c <stg_ap_v_info$def+48>:    add     r2, pc, #0
(gdb) 
0x0371ee90 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee90 <stg_ap_v_info$def+52>:    ldr     pc, [r2, r6, lsl #2]
(gdb) 
0x0371ef80 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ef80 <stg_ap_v_info$def+292>:   ldrsh   r2, [r0, #-10]
(gdb) 
0x0371ef84 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ef84 <stg_ap_v_info$def+296>:   uxth    r1, r2
(gdb) 

Thread 1 "git-annex" received signal SIGILL, Illegal instruction.
0x0371ef84 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ef84 <stg_ap_v_info$def+296>:   uxth    r1, r2
(gdb) bt
#0  0x0371ef84 in stg_ap_v_info$def ()
#1  0x03700118 in schedule ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)







gdb -q \
    -ex 'set width 0' \
    -ex 'set pagination off' \
    -ex 'directory /home/benutzer/source/git-annex/orig/git-annex-7.20190122' \
    -ex 'display/i $pc' \
    -ex 'b main' \
    -ex 'run' \
    -ex 'dele 1' \
    -ex 'print stg_returnToStackTop$def+16' \
    -ex 'b *$1' \
    -ex 'cont' \
    --args git-annex --help




benutzer at debian:~$ gdb -q \
>     -ex 'set width 0' \
>     -ex 'set pagination off' \
>     -ex 'directory /home/benutzer/source/git-annex/orig/git-annex-7.20190122' \
>     -ex 'display/i $pc' \
>     -ex 'b main' \
>     -ex 'run' \
>     -ex 'dele 1' \
>     -ex 'print stg_returnToStackTop$def+16' \
>     -ex 'b *$1' \
>     -ex 'cont' \
>     --args git-annex --help
Reading symbols from git-annex...Reading symbols from /usr/lib/debug/.build-id/2e/b84d9cee7f3bfd1e0f737e7714c5ac7fc3ba48.debug...done.
done.
Source directories searched: /home/benutzer/source/git-annex/orig/git-annex-7.20190122:$cdir:$cwd
1: x/i $pc
<error: No registers.>
Breakpoint 1 at 0xd79c: file /tmp/ghc23822_0/ghc_295.c, line 5.
Starting program: /usr/bin/git-annex --help
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".

Breakpoint 1, main (argc=2, argv=0xbefff6c4) at /tmp/ghc23822_0/ghc_295.c:5
5       /tmp/ghc23822_0/ghc_295.c: Datei oder Verzeichnis nicht gefunden.
1: x/i $pc
=> 0xd79c <main>:       ldr     r5, [pc, #148]  ; 0xd838 <main+156>
$1 = (<text variable, no debug info> *) 0x3718a2c <stg_returnToStackTop$def+16>
Breakpoint 2 at 0x3718a2c
Continuing.
[New Thread 0xb42ff450 (LWP 2031)]

Thread 1 "git-annex" hit Breakpoint 2, 0x03718a2c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a2c <stg_returnToStackTop$def+16>:     add     r11, r2, #100   ; 0x64
(gdb) bt
#0  0x03718a2c in stg_returnToStackTop$def ()
#1  0x03700118 in schedule ()
#2  0x03701670 in scheduleWaitThread ()
#3  0x037183a8 in ioManagerStart ()
#4  0x036fe9ac in hs_init_ghc ()
#5  0x0370df40 in hs_main ()
#6  0x0000d838 in main (argc=2, argv=0xbefff6c4) at /tmp/ghc23822_0/ghc_295.c:9
(gdb) nexti
0x03718a30 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a30 <stg_returnToStackTop$def+20>:     ldr     r5, [r2, #12]
(gdb) bt
#0  0x03718a30 in stg_returnToStackTop$def ()
#1  0x03700118 in schedule ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) nexti
0x03718a34 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a34 <stg_returnToStackTop$def+24>:     str     r1, [r4, #828]  ; 0x33c
(gdb) 
0x03718a38 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a38 <stg_returnToStackTop$def+28>:     ldr     r1, [r3]
(gdb) 
0x03718a3c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a3c <stg_returnToStackTop$def+32>:     ldr     r0, [r3, #4]
(gdb) 
0x03718a40 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a40 <stg_returnToStackTop$def+36>:     ldr     r3, [r3, #28]
(gdb) 
0x03718a44 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a44 <stg_returnToStackTop$def+40>:     add     r3, r1, r3, lsl #12
(gdb) 
0x03718a48 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a48 <stg_returnToStackTop$def+44>:     sub     r3, r3, #1
(gdb) 
0x03718a4c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a4c <stg_returnToStackTop$def+48>:     str     r3, [r4, #804]  ; 0x324
(gdb) 
0x03718a50 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a50 <stg_returnToStackTop$def+52>:     ldrd    r8, [r6, #64]   ; 0x40
(gdb) 
0x03718a54 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a54 <stg_returnToStackTop$def+56>:     sub     r3, r0, r1
(gdb) 
0x03718a58 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a58 <stg_returnToStackTop$def+60>:     adds    r8, r8, r3
(gdb) 
0x03718a5c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a5c <stg_returnToStackTop$def+64>:     adc     r9, r9, #0
(gdb) 
0x03718a60 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a60 <stg_returnToStackTop$def+68>:     strd    r8, [r6, #64]   ; 0x40
(gdb) 
0x03718a64 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a64 <stg_returnToStackTop$def+72>:     sub     r6, r0, #4
(gdb) 
0x03718a68 in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a68 <stg_returnToStackTop$def+76>:     ldr     r0, [r5]
(gdb) 
0x03718a6c in stg_returnToStackTop$def ()
1: x/i $pc
=> 0x3718a6c <stg_returnToStackTop$def+80>:     bx      r0
(gdb) 
0x0371e0cc in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0cc <stg_enter_info$def>:      ldr     r7, [r5, #4]
(gdb) bt
#0  0x0371e0cc in stg_enter_info$def ()
#1  0x03700118 in schedule ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) nexti
0x0371e0d0 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0d0 <stg_enter_info$def+4>:    tst     r7, #3
(gdb) 
0x0371e0d4 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0d4 <stg_enter_info$def+8>:    beq     0x371e0ec <stg_enter_info$def+32>
(gdb) 
0x0371e0ec in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0ec <stg_enter_info$def+32>:   ldr     r0, [r7]
(gdb) 
0x0371e0f0 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0f0 <stg_enter_info$def+36>:   ldrsh   r3, [r0, #-4]
(gdb) 
0x0371e0f4 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0f4 <stg_enter_info$def+40>:   sub     r2, r3, #27
(gdb) 
0x0371e0f8 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0f8 <stg_enter_info$def+44>:   cmp     r2, #2
(gdb) 
0x0371e0fc in stg_enter_info$def ()
1: x/i $pc
=> 0x371e0fc <stg_enter_info$def+48>:   bcc     0x371e0dc <stg_enter_info$def+16>
(gdb) 
0x0371e100 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e100 <stg_enter_info$def+52>:   cmp     r3, #25
(gdb) 
0x0371e104 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e104 <stg_enter_info$def+56>:   bhi     0x371e124 <stg_enter_info$def+88>
(gdb) 
0x0371e108 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e108 <stg_enter_info$def+60>:   mov     r2, #32512      ; 0x7f00
(gdb) 
0x0371e10c in stg_enter_info$def ()
1: x/i $pc
=> 0x371e10c <stg_enter_info$def+64>:   mov     r1, #1
(gdb) 
0x0371e110 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e110 <stg_enter_info$def+68>:   orr     r2, r2, #41943040       ; 0x2800000
(gdb) 
0x0371e114 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e114 <stg_enter_info$def+72>:   tst     r2, r1, lsl r3
(gdb) 
0x0371e118 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e118 <stg_enter_info$def+76>:   beq     0x371e124 <stg_enter_info$def+88>
(gdb) 
0x0371e11c in stg_enter_info$def ()
1: x/i $pc
=> 0x371e11c <stg_enter_info$def+80>:   ldr     r0, [r5, #8]!
(gdb) 
0x0371e120 in stg_enter_info$def ()
1: x/i $pc
=> 0x371e120 <stg_enter_info$def+84>:   bx      r0
(gdb) 
0x0371ee5c in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee5c <stg_ap_v_info$def>:       mov     r3, r6
(gdb) bt
#0  0x0371ee5c in stg_ap_v_info$def ()
#1  0x03700118 in schedule ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) nexti
0x0371ee60 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee60 <stg_ap_v_info$def+4>:     b       0x371ee68 <stg_ap_v_info$def+12>
(gdb) 
0x0371ee68 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee68 <stg_ap_v_info$def+12>:    and     r6, r7, #3
(gdb) 
0x0371ee6c in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee6c <stg_ap_v_info$def+16>:    cmp     r6, #1
(gdb) 
0x0371ee70 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee70 <stg_ap_v_info$def+20>:    beq     0x371ef70 <stg_ap_v_info$def+276>
(gdb) 
0x0371ee74 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee74 <stg_ap_v_info$def+24>:    bic     r7, r7, #3
(gdb) 
0x0371ee78 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee78 <stg_ap_v_info$def+28>:    ldr     r0, [r7]
(gdb) 
0x0371ee7c in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee7c <stg_ap_v_info$def+32>:    ldrsh   r6, [r0, #-4]
(gdb) 
0x0371ee80 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee80 <stg_ap_v_info$def+36>:    sub     r6, r6, #8
(gdb) 
0x0371ee84 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee84 <stg_ap_v_info$def+40>:    cmp     r6, #50 ; 0x32
(gdb) 
0x0371ee88 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee88 <stg_ap_v_info$def+44>:    bhi     0x371f0c4 <stg_ap_v_info$def+616>
(gdb) 
0x0371ee8c in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee8c <stg_ap_v_info$def+48>:    add     r2, pc, #0
(gdb) 
0x0371ee90 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ee90 <stg_ap_v_info$def+52>:    ldr     pc, [r2, r6, lsl #2]
(gdb) 
0x0371ef80 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ef80 <stg_ap_v_info$def+292>:   ldrsh   r2, [r0, #-10]
(gdb) 
0x0371ef84 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ef84 <stg_ap_v_info$def+296>:   uxth    r1, r2
(gdb) 

Thread 1 "git-annex" received signal SIGILL, Illegal instruction.
0x0371ef84 in stg_ap_v_info$def ()
1: x/i $pc
=> 0x371ef84 <stg_ap_v_info$def+296>:   uxth    r1, r2
(gdb) bt
#0  0x0371ef84 in stg_ap_v_info$def ()
#1  0x03700118 in schedule ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) disassemble stg_ap_v_info$def
Dump of assembler code for function stg_ap_v_info$def:
   0x0371ee5c <+0>:     mov     r3, r6
   0x0371ee60 <+4>:     b       0x371ee68 <stg_ap_v_info$def+12>
   0x0371ee64 <+8>:     ldr     r7, [r7, #4]
   0x0371ee68 <+12>:    and     r6, r7, #3
   0x0371ee6c <+16>:    cmp     r6, #1
   0x0371ee70 <+20>:    beq     0x371ef70 <stg_ap_v_info$def+276>
   0x0371ee74 <+24>:    bic     r7, r7, #3
   0x0371ee78 <+28>:    ldr     r0, [r7]
   0x0371ee7c <+32>:    ldrsh   r6, [r0, #-4]
   0x0371ee80 <+36>:    sub     r6, r6, #8
   0x0371ee84 <+40>:    cmp     r6, #50 ; 0x32
   0x0371ee88 <+44>:    bhi     0x371f0c4 <stg_ap_v_info$def+616>
   0x0371ee8c <+48>:    add     r2, pc, #0
   0x0371ee90 <+52>:    ldr     pc, [r2, r6, lsl #2]
   0x0371ee94 <+56>:    cmneq   r1, #128, 30    ; 0x200
   0x0371ee98 <+60>:    cmneq   r1, #128, 30    ; 0x200
   0x0371ee9c <+64>:    cmneq   r1, #128, 30    ; 0x200
   0x0371eea0 <+68>:    cmneq   r1, #128, 30    ; 0x200
   0x0371eea4 <+72>:    cmneq   r1, #128, 30    ; 0x200
   0x0371eea8 <+76>:    cmneq   r1, #128, 30    ; 0x200
   0x0371eeac <+80>:    cmneq   r1, #128, 30    ; 0x200
   0x0371eeb0 <+84>:    cmneq   r1, #96, 30     ; 0x180
   0x0371eeb4 <+88>:    cmneq   r1, #96, 30     ; 0x180
   0x0371eeb8 <+92>:    cmneq   r1, #96, 30     ; 0x180
   0x0371eebc <+96>:    cmneq   r1, #96, 30     ; 0x180
   0x0371eec0 <+100>:   cmneq   r1, #96, 30     ; 0x180
   0x0371eec4 <+104>:   cmneq   r1, #96, 30     ; 0x180
   0x0371eec8 <+108>:   cmneq   r1, #96, 30     ; 0x180
   0x0371eecc <+112>:   cmneq   r1, #96, 30     ; 0x180
   0x0371eed0 <+116>:   cmneq   r1, #24 ; <UNPREDICTABLE>
   0x0371eed4 <+120>:   cmneq   r1, #96, 30     ; 0x180
   0x0371eed8 <+124>:   cmneq   r1, #252, 30    ; 0x3f0
   0x0371eedc <+128>:   cmneq   r1, #96, 30     ; 0x180
   0x0371eee0 <+132>:   cmneq   r1, #100, 28    ; 0x640
   0x0371eee4 <+136>:   cmneq   r1, #100, 28    ; 0x640
   0x0371eee8 <+140>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371eeec <+144>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371eef0 <+148>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371eef4 <+152>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371eef8 <+156>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371eefc <+160>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef00 <+164>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef04 <+168>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef08 <+172>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef0c <+176>:   cmneq   r1, #96, 30     ; 0x180
   0x0371ef10 <+180>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef14 <+184>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef18 <+188>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef1c <+192>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef20 <+196>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef24 <+200>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef28 <+204>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef2c <+208>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef30 <+212>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef34 <+216>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef38 <+220>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef3c <+224>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef40 <+228>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef44 <+232>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef48 <+236>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef4c <+240>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef50 <+244>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef54 <+248>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef58 <+252>:   cmneq   r1, #196        ; 0xc4  ; <UNPREDICTABLE>
   0x0371ef5c <+256>:   cmneq   r1, #96, 30     ; 0x180
   0x0371ef60 <+260>:   ldr     r6, [pc, #360]  ; 0x371f0d0 <stg_ap_v_info$def+628>
   0x0371ef64 <+264>:   str     r6, [r5]
   0x0371ef68 <+268>:   mov     r6, r3
   0x0371ef6c <+272>:   bx      r0
   0x0371ef70 <+276>:   ldr     r0, [r7, #-1]
   0x0371ef74 <+280>:   add     r5, r5, #4
   0x0371ef78 <+284>:   mov     r6, r3
   0x0371ef7c <+288>:   bx      r0
   0x0371ef80 <+292>:   ldrsh   r2, [r0, #-10]
=> 0x0371ef84 <+296>:   uxth    r1, r2
   0x0371ef88 <+300>:   cmp     r1, #1
   0x0371ef8c <+304>:   bne     0x371efa4 <stg_ap_v_info$def+328>
   0x0371ef90 <+308>:   ldr     r0, [r7]
   0x0371ef94 <+312>:   add     r5, r5, #4
   0x0371ef98 <+316>:   orr     r7, r7, #1
   0x0371ef9c <+320>:   mov     r6, r3
   0x0371efa0 <+324>:   bx      r0
...
   0x0371f0d0 <+628>:   cmneq   r1, #92, 28     ; 0x5c0
   0x0371f0d4 <+632>:                   ; <UNDEFINED> instruction: 0x03a834a0
End of assembler dump.

(gdb) print/x $r1
$2 = 0x1
(gdb) print/x $r2
$3 = 0x1





http://infocenter.arm.com/help/topic/com.arm.doc.dui0489i/CIHHJCFE.html

UXTH
Zero extend Halfword. Extends a 16-bit value to a 32-bit value.
...
Architectures
This ARM instruction is available in ARMv6 and above.
This 32-bit Thumb instruction is available in ARMv6T2 and above. For the ARMv7-M architecture, it is only available in an ARMv7E-M implementation.
This 16-bit Thumb instruction is available in ARMv6 and above.




root at debian:~# cat /proc/cpuinfo 
processor       : 0
model name      : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 400.00
Features        : swp half thumb fastmult edsp 
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Marvell Kirkwood (Flattened Device Tree)
Revision        : 0000
Serial          : 0000000000000000



More information about the Pkg-haskell-maintainers mailing list