blackberry/SDL — Issue #10: SDL_Init triggers core dump on OS2.0.0.7111 with NDK Beta3
Author: trevornunes
Created: 2012-02-07 05:51:58+00:00
State: open

OS 2.0.0.7111 0x4ddb148 _malloc_error_internal

I'm running into a strange crash compiling 'DGEN' a Sega Genesis emulator. The 1.0 package works fine but the same code appears to trigger a core file. It's dead after a call to SDL_Init. No idea how to pursue this further since it's corrupting in a runtime library ...

https://github.com/trevornunes/DGEN/blob/master/src/sdl/sdl.cpp#L1229 It dies not long after this call ...

Backtrace and dissassembly follow:

Thread [1] (Suspended : Signal : SIGABRT:Aborted)
SignalKill() at 0x4dec4f0
raise() at 0x4ddc9e4
0x4ddb148
0x4ddb148

_malloc_error_internal:
04ddb0a0: ldr r12, [pc, #56] ; 0x4ddb0e0 <_malloc_error_internal+64>
04ddb0a4: mov r3, r2
04ddb0a8: push {r4, lr}
04ddb0ac: mov r4, r0
04ddb0b0: ldr r0, [pc, #44] ; 0x4ddb0e4 <_malloc_error_internal+68>
04ddb0b4: mov lr, r1
04ddb0b8: add r12, pc, r12
04ddb0bc: mov r2, lr
04ddb0c0: add r0, r12, r0
04ddb0c4: mov r1, r4
04ddb0c8: bl 0x4dc4694
04ddb0cc: mvn r3, #0
04ddb0d0: mov r2, #0
04ddb0d4: mov r0, #1
04ddb0d8: str r2, [r3]
04ddb0dc: bl 0x4dc6794
04ddb0e0: andeq r1, r5, r0, asr #30
04ddb0e4: ; instruction: 0xffffa80c
04ddb0e8: push {r4, r5, r6, lr}
04ddb0ec: sub sp, sp, #24
04ddb0f0: mov r0, #6
04ddb0f4: mov r1, #0
04ddb0f8: mov r2, sp
04ddb0fc: bl 0x4dc5aa4
04ddb100: ldr r0, [sp]
04ddb104: cmp r0, #1
04ddb108: beq 0x4ddb184
04ddb10c: cmp r0, #0
04ddb110: beq 0x4ddb1a4
04ddb114: add r4, sp, #16
04ddb118: mov r5, #0
04ddb11c: mov r0, r4
04ddb120: bl 0x4dc59b4
04ddb124: mov r1, #6
04ddb128: mov r0, r4
04ddb12c: bl 0x4dc6638
04ddb130: mov r1, r4
04ddb134: mov r2, r5
04ddb138: mov r0, #2
04ddb13c: bl 0x4dc58c4
04ddb140: mov r0, #6
04ddb144: bl 0x4dc6b3c
04ddb148: mov r0, r5 <<<<<<<<<<<< ABRT
04ddb14c: bl 0x4dc4f40
04ddb150: mov r1, sp
04ddb154: mov r2, r5
04ddb158: mov r0, #6
04ddb15c: str r5, [sp]
04ddb160: bl 0x4dc5aa4