[GHC] #9452: freeGroup: block size is zero
GHC
ghc-devs at haskell.org
Sun Aug 17 19:02:27 UTC 2014
#9452: freeGroup: block size is zero
----------------------------------+----------------------------------------
Reporter: scott.sadler | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.8.3
Keywords: | Operating System: MacOS X
Architecture: x86_64 (amd64) | Type of failure: Runtime crash
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
----------------------------------+----------------------------------------
I'm trying to extract pixels from OpenGL and read them into a
ForeignPointer, but getting a segfault while doing a peek operation.
The fault is on line 240 in `peekArray`. It crashes in different ways
depending on the arguments to `readPixelArray`.
with `readPixelArray 0 0 100 100`:
{{{
(lldb) run
Process 26467 launched: '/Users/scott/Code/grids/dist/build/grids/grids'
(x86_64)
0x00000001015b3010
Process 26467 stopped
* thread #1: tid = 0x23d3cc, 0x0000000100621ead grids`evacuate + 157,
queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1,
address=0xfffffffffffffff8)
frame #0: 0x0000000100621ead grids`evacuate + 157
grids`evacuate + 157:
-> 0x100621ead: movl -0x8(%r12), %esi
0x100621eb2: leal -0x1(%rsi), %ecx
0x100621eb5: cmpl $0x3b, %ecx
0x100621eb8: ja 0x1006222a9 ; evacuate + 1177
}}}
with `readPixelArray 0 0 200 200`:
(lldb) run
Process 26647 launched: '/Users/scott/Code/grids/dist/build/grids/grids'
(x86_64)
0x00000001095d8010
grids: internal error: freeGroup: block size is zero
(GHC version 7.8.3 for x86_64_apple_darwin)
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
Process 26647 stopped
* thread #1: tid = 0x23f4d4, 0x00007fff8b2cc866
libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-
thread', stop reason = signal SIGABRT
frame #0: 0x00007fff8b2cc866 libsystem_kernel.dylib`__pthread_kill +
10
libsystem_kernel.dylib`__pthread_kill + 10:
-> 0x7fff8b2cc866: jae 0x7fff8b2cc870 ; __pthread_kill + 20
0x7fff8b2cc868: movq %rax, %rdi
0x7fff8b2cc86b: jmpq 0x7fff8b2c9175 ; cerror_nocancel
0x7fff8b2cc870: ret
The "freeGroup: block size is zero" message appears in the second output.
I'm stumped trying to debug this one. I didn't get as far as trying to go
backwards in time debugging it because of lack of familiarity with lldb.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9452>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list