[GHC] #10375: arm: ghci hits an illegal instruction

GHC ghc-devs at haskell.org
Fri May 22 07:22:10 UTC 2015


#10375: arm: ghci hits an illegal instruction
-------------------------------------+---------------------------------
        Reporter:  erikd             |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:  7.10.2
       Component:  GHCi              |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:  arm
 Type of failure:  GHCi crash        |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+---------------------------------

Comment (by erikd):

 Using the gdb macros on the wiki I can retrieve the following info after
 the segfault:

 {{{
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0xb14ff460 (LWP 7214)]
 0xb88d09d4 in ?? ()
 (gdb) bt
 #0  0xb88d09d4 in ?? ()
 #1  0x70000000 in ?? ()
 Backtrace stopped: previous frame identical to this frame (corrupt stack?)
 (gdb) pregs
 $1 = {rR1 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      ,rR2 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rR3 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rR4 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rR5 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rR6 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rR7 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rR8 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rR9 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rR10 = {w = 0, a = 0x0, c = 0, f = 0, i = 0, p = 0x0}
      , rF1 = 0, rF2 = 0, rF3 = 0, rF4 = 0, rF5 = 0, rF6 = 0
      , rD1 = 0, rD2 = 0, rD3 = 0, rD4 = 0, rD5 = 0, rD6 = 0
      , rXMM1 = {h = 0, l = 0}
      , rXMM2 = {h = 0, l = 0}
      , rXMM3 = {h = 0, l = 0}
      , rXMM4 = {h = 0, l = 0}
      , rXMM5 = {h = 0, l = 0}
      , rXMM6 = {h = 0, l = 0}
      , rYMM1 = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}
      , rYMM2 = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}
      , rYMM3 = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}
      , rYMM4 = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}
      , rYMM5 = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}
      , rYMM6 = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}
      , rZMM1 = {h = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}, l = {h = {h
 = 0, l = 0}, l = {h = 0, l = 0}}}
      , rZMM2 = {h = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}, l = {h = {h
 = 0, l = 0}, l = {h = 0, l = 0}}}
      , rZMM3 = {h = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}, l = {h = {h
 = 0, l = 0}, l = {h = 0, l = 0}}}
      , rZMM4 = {h = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}, l = {h = {h
 = 0, l = 0}, l = {h = 0, l = 0}}}
      , rZMM5 = {h = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}, l = {h = {h
 = 0, l = 0}, l = {h = 0, l = 0}}}
      , rZMM6 = {h = {h = {h = 0, l = 0}, l = {h = 0, l = 0}}, l = {h = {h
 = 0, l = 0}, l = {h = 0, l = 0}}}
      , rL1 = 0, rSp = 0x0, rSpLim = 0x0, rHp = 0x0, rHpLim = 0xb08fbfff
      , rCCCS = 0x0, rCurrentTSO = 0xb09cc8a4, rNursery = 0x109078
      , rCurrentNursery = 0xb0801f60, rCurrentAlloc = 0xb0901980, rHpAlloc
 = 0, rRet = 3}
 (gdb) ptso
 $2 = {header = {info = 0xb2bf43c0 <stg_TSO_info$def>}, _link = 0xb2c146d8
 <stg_END_TSO_QUEUE_closure>
      , global_link = 0xb2c146d8 <stg_END_TSO_QUEUE_closure>
      , stackobj = 0xb09cc4f4, what_next = 1, why_blocked = 0, flags = 0
      , block_info = {closure = 0xb2c146d8 <stg_END_TSO_QUEUE_closure>
                     , prev = 0xb2c146d8 <stg_END_TSO_QUEUE_closure>
                     , bh = 0xb2c146d8 <stg_END_TSO_QUEUE_closure>
                     , throwto = 0xb2c146d8 <stg_END_TSO_QUEUE_closure>
                     , wakeup = 0xb2c146d8 <stg_END_TSO_QUEUE_closure>
                     , fd = -1295956264
                     }
      , id = 22, saved_errno = 0, dirty = 1
      , bound = 0x0, cap = 0xb2c16180 <MainCapability>
      , trec = 0xb2c146d0 <stg_NO_TREC_closure>
      , blocked_exceptions = 0xb2c146d8 <stg_END_TSO_QUEUE_closure>
      , bq = 0xb2c146d8 <stg_END_TSO_QUEUE_closure>
      , alloc_limit = 2592, tot_stack_size = 232
      }
 (gdb) info registers
 r0             0xb6f73018       3069653016
 r1             0xb2bf434c       2998879052
 r2             0x1      1
 r3             0xb09cc7c6       2963064774
 r4             0xb2c16190       2999017872
 r5             0xb09cc81c       2963064860
 r6             0xb08fbbf4       2962209780
 r7             0xb09cc938       2963065144
 r8             0xb14fefa0       2974805920
 r9             0x0      0
 r10            0xb2bf4160       2998878560
 r11            0xb09cc558       2963064152
 r12            0xb2c15b8c       2999016332
 sp             0xb14fcd68       0xb14fcd68
 lr             0x70000000       1879048192
 pc             0xb88d09d4       0xb88d09d4
 cpsr           0x400f0010       1074724880

 }}}

 The `pc` register definitetly does contain a bad value, but there's no
 good explanation of how it got there.

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


More information about the ghc-tickets mailing list