freeGroup: block size is zero
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 (closed): 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.
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | simonmar |
Operating system | |
Architecture |