[GHC] #11340: linker_unload test fails on ARM
GHC
ghc-devs at haskell.org
Sat Jan 2 18:26:01 UTC 2016
#11340: linker_unload test fails on ARM
-------------------------------------+------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: arm
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+------------------------------
Comment (by bgamari):
The crash is quite reproducible. It generally looks like this,
{{{
$ gdb --args linker_unload /mnt/ext/exp/ghc/inplace/lib +RTS
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
...
Reading symbols from linker_unload...done.
(gdb) run /mnt/ext/exp/ghc/inplace/lib +RTS -Dl 2> h
Starting program: /mnt/ext/exp/ghc/testsuite/tests/rts/linker_unload
/mnt/ext/exp/ghc/inplace/lib +RTS -Dl 2> h
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-
gnueabihf/libthread_db.so.1".
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
78 79 80 81 82 83 84 85
Program received signal SIGSEGV, Segmentation fault.
0xb8f6cf70 in ?? ()
(gdb) info reg
r0 0xb6ff7278 3070194296
r1 0x4507d40 72383808
r2 0xbefff578 3204445560
r3 0xb6ff7214 3070194196
r4 0xbefff3c0 3204445120
r5 0xbefff3c4 3204445124
r6 0xd8 216
r7 0x0 0
r8 0x0 0
r9 0x0 0
r10 0xb6fff000 3070226432
r11 0xbefff31c 3204444956
r12 0x45003f4 72352756
sp 0xbefff318 0xbefff318
lr 0xb6ff7228 -1224773080
pc 0xb8f6cf70 0xb8f6cf70
cpsr 0x800f0010 -2146500592
(gdb) bt
#0 0xb8f6cf70 in ?? ()
#1 0xb6ff7228 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) x/i $lr
0xb6ff7228: pop {r11, pc}
(gdb) x/32i $lr-64
0xb6ff71e8: ldr r3, [r11, #-24]
0xb6ff71ec: mov r0, r3
0xb6ff71f0: bl 0xb8f6cf50
0xb6ff71f4: str r0, [r11, #-16]
0xb6ff71f8: ldr r3, [r11, #-20]
0xb6ff71fc: mov r0, r3
0xb6ff7200: bl 0xb8f6cf60
0xb6ff7204: ldr r3, [r11, #-16]
0xb6ff7208: mov r0, r3
0xb6ff720c: sub sp, r11, #12
0xb6ff7210: pop {r4, r5, r11, pc}
0xb6ff7214: push {r11, lr}
0xb6ff7218: add r11, sp, #4
0xb6ff721c: movw r0, #29304 ; 0x7278
0xb6ff7220: movt r0, #46847 ; 0xb6ff
0xb6ff7224: bl 0xb8f6cf70
0xb6ff7228: pop {r11, pc}
0xb6ff722c: andeq r0, r0, r0
0xb6ff7230: ; <UNDEFINED> instruction: 0xb6fee838
...
}}}
Looks like reasonable code to me. Unfortunately it appears that the code
at `*$pc` is total garbage. Moreover, looking at the linker output it
seems that no code was ever mapped at this address.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11340#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list