[GHC] #10863: "hello world" produces illegal instruction error

GHC ghc-devs at haskell.org
Sun Sep 13 22:52:56 UTC 2015


#10863: "hello world" produces illegal instruction error
----------------------------------+---------------------------------
        Reporter:  Ansible        |                   Owner:
            Type:  bug            |                  Status:  new
        Priority:  normal         |               Milestone:
       Component:  Compiler       |                 Version:  7.10.2
      Resolution:                 |                Keywords:
Operating System:  Linux          |            Architecture:  arm
 Type of failure:  Runtime crash  |               Test Case:
      Blocked By:                 |                Blocking:
 Related Tickets:                 |  Differential Revisions:
----------------------------------+---------------------------------

Comment (by Ansible):

 Ok here you go.  I build it like so:

 > ghc hello.hs -debug

 And the gdb output:

 `(gdb) run
 Starting program: /home/bburdette/code/ghcbug/hello
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/arm-linux-
 gnueabihf/libthread_db.so.1".

 Program received signal SIGILL, Illegal instruction.
 0x0000abc0 in main ()
 (gdb) bt
 #0  0x0000abc0 in main ()
 (gdb) disas
 Dump of assembler code for function main:
    0x0000abb0 <+0>:     push    {r4, r7, lr}
    0x0000abb2 <+2>:     sub     sp, #36 ; 0x24
    0x0000abb4 <+4>:     add     r7, sp, #8
    0x0000abb6 <+6>:     str     r0, [r7, #4]
    0x0000abb8 <+8>:     str     r1, [r7, #0]
    0x0000abba <+10>:    movw    r3, #57520      ; 0xe0b0
    0x0000abbe <+14>:    movt    r3, #61 ; 0x3d
    0x0000abc2 <+18>:    add.w   r4, r7, #12
    0x0000abc6 <+22>:    ldmia.w r3, {r0, r1, r2}
    0x0000abca <+26>:    stmia.w r4, {r0, r1, r2}
    0x0000abce <+30>:    movs    r3, #1
    0x0000abd0 <+32>:    str     r3, [r7, #12]
    0x0000abd2 <+34>:    movs    r3, #1
    0x0000abd4 <+36>:    str     r3, [r7, #20]
    0x0000abd6 <+38>:    mov     r2, sp
    0x0000abd8 <+40>:    add.w   r3, r7, #16
    0x0000abdc <+44>:    ldmia.w r3, {r0, r1}
    0x0000abe0 <+48>:    stmia.w r2, {r0, r1}
    0x0000abe4 <+52>:    ldr     r3, [r7, #12]
    0x0000abe6 <+54>:    ldr     r0, [r7, #4]
    0x0000abe8 <+56>:    ldr     r1, [r7, #0]
    0x0000abea <+58>:    movw    r2, #45368      ; 0xb138
    0x0000abee <+62>:    movt    r2, #62 ; 0x3e
    0x0000abf2 <+66>:    bl      0x38f26c <hs_main>
 End of assembler dump.
 (gdb) info reg
 r0             0x1624b0 1451184
 r1             0x76cff004       1993338884
 r2             0x3eb138 4108600
 r3             0x76c03400       1992307712
 r4             0x40c590 4244880
 r5             0x76c033a0       1992307616
 r6             0x76c01ffc       1992302588
 r7             0x3f68a0 4155552
 r8             0x3eb128 4108584
 r9             0x0      0
 r10            0x76fff000       1996484608
 r11            0x76c03064       1992306788
 r12            0x76df08f1       1994328305
 sp             0x7effd4a0       0x7effd4a0
 lr             0x39c119 3784985
 pc             0xabc0   0xabc0 <main+16>
 cpsr           0x20010010       536936464
 (gdb) `

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10863#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list