In the attachment are the bt, the disas sembly of the function of interest
until the bus error, and the state of the registers. I'm completely new to
llvm, and I'm trying to build my cabin here, so I can't be of any help
(I'm not familiar with the restrictions you are imposing here), altough I
bet the problem is in their memory management: source/fitz/memory.c.
Good luck!
adr.
$ mupdf somefile.pdf
Bus error (core dumped)
$ gdb mupdf mupdf-x11.core
[...]
(gdb) bt
#0 0x07e332dc in fz_paint_glyph () from /usr/local/bin/mupdf
#1 0x in ?? ()
(gdb) disassemble
Dump of assembler code for function fz_paint_glyph:
0x07e31a44 : stmdb sp!, {r4, r5, r6, r7, r8, r9, r10, r11,
lr}
0x07e31a48 : add r11, sp, #28; 0x1c
0x07e31a4c : sub sp, sp, #4 ; 0x4
0x07e31a50 : fstmdbd sp!, {d8-d15}
0x07e31a54 : sub sp, sp, #264; 0x108
0x07e31a58 : undefined
0x07e31a5c : str r3, [sp, #244]
0x07e31a60 : str r2, [sp, #256]
0x07e31a64 : ldr r3, [r1, #44]
0x07e31a68 : ldr r4, [r11, #20]
0x07e31a6c : ldr r2, [r11, #12]
0x07e31a70 : cmp r3, #0 ; 0x0
0x07e31a74 : beq 0x7e31f2c
0x07e31a78 : ldrbr6, [r1, #24]
0x07e31a7c : ldrblr, [r1, #26]
0x07e31a80 : str r0, [sp, #260]
0x07e31a84 : sub r8, r6, lr
0x07e31a88 : ldrbr7, [r0, r8]
0x07e31a8c : cmp r7, #0 ; 0x0
0x07e31a90 : beq 0x7e32288
0x07e31a94 : ldr r10, [r11, #24]
0x07e31a98 : mov r5, r2
0x07e31a9c : mov r2, r4
0x07e31aa0 : cmp r7, #255; 0xff
0x07e31aa4 : bne 0x7e32298
0x07e31aa8 :cmp r10, #0 ; 0x0
0x07e31aac :ldr r0, [r1, #28]
0x07e31ab0 :ldrne r1, [r10]
0x07e31ab4 :str r0, [sp, #220]
0x07e31ab8 :cmpne r1, #0 ; 0x0
0x07e31abc :bne 0x7e328a0
0x07e31ac0 :cmp r8, #4 ; 0x4
0x07e31ac4 :beq 0x7e32f4c
0x07e31ac8 :cmp r8, #3 ; 0x3
0x07e31acc :beq 0x7e332bc
0x07e31ad0 :cmp r8, #1 ; 0x1
0x07e31ad4 :bne 0x7e338f0
0x07e31ad8 :cmp lr, #0 ; 0x0
0x07e31adc :beq 0x7e35540
0x07e31ae0 :cmp r5, #0 ; 0x0
0x07e31ae4 :beq 0x7e32288
0x07e31ae8 :ldr r0, [sp, #260]
0x07e31aec :bicnv r2, r7, #95 ; 0x5f
0x07e31af0 :mov r9, #1 ; 0x1
0x07e31af4 :ldrhr8, [r0]
0x07e31af8 :ldr r0, [sp, #244]
0x07e31afc :add lr, r0, #32 ; 0x20
0x07e31b00 :mcr 11, 5, r8, cr0, cr0, {5}
0x07e31b04 :str lr, [sp, #224]
0x07e31b08 :ldr r0, [lr, r2, lsl #2]
0x07e31b0c :sub r5, r5, #1 ; 0x1
0x07e31b10 :str r2, [sp, #248]
0x07e31b14 :str r5, [sp, #252]
0x07e31b18 :cmp r0, #0 ; 0x0
0x07e31b1c :blt 0x7e31be8
0x07e31b20 :ldr r1, [sp, #244]
0x07e31b24 :ldr r2, [r11, #16]
0x07e31b28 :add r0, r1, r0
0x07e31b2c :ldr r4, [sp, #256]
0x07e31b30 :add r7, r0, #32 ; 0x20
0x07e31b34 :mov r1, #0 ; 0x0
0x07e31b38 :cmp r2, #0 ; 0x0
0x07e31b3c :beq 0x7e31bf0
0x07e31b40 :ldr r5, [sp, #260]
0x07e31b44 :mov r1, #0 ; 0x0
0x07e31b48 :ldrbr6, [r7], #1
0x07e31b4c :and r0, r6, #3 ; 0x3
0x07e31b50 :cmp r0, #2 ; 0x2
0x07e31b54 :beq 0x7e31b7c
0x07e31b58 :cmp r0, #1 ; 0x1
0x07e31b5c :beq 0x7e31b94
0x07e31b60 :cmp r0, #0 ; 0x0
0x07e31b64 :bne 0x7e31bac
0x07e31b68 :mov r1, r6, lsr #2
0x07e31b6c :mov r3, #0 ; 0x0
0x07e31b70 :subsr2, r2, r3
0x07e31b74 :bne 0x7e31b48
0x07e31b78 :b 0x7e31bd8
0x07e31b7c :orr r0, r9, r1, lsl #5
0x07e31b80 :and r12, r6, #4 ; 0x4
0x07e31b84 :add r3, r0, r6, lsr #3
0x07e31b88 :cmp r3, r2
0x07e31b8c :ble 0x7e31bc4
0x07e31b90 :b 0x7e31c0c
0x07e31b94 :orr r0, r9, r1, lsl #6
0x07e31b98 :mov r1, #0 ; 0x0
0x07e31b9c :add r3, r0, r6, lsr #2
0x07e31ba0 :cmp r3, r2
0x07e31ba4 :ble 0x7e31bd0
0x07e31ba8 :b 0x7e31c1c
0x07e31bac :orr r0, r9, r1, lsl #5
0x07e31bb0 :and r12, r6, #4 ; 0x4
0x07e31bb4 :add r3, r0, r6, lsr #3
0x07e31bb8 :cmp r3, r2
0x07e31bbc :bgt 0x7e31c30
0x07e31bc0 :add r7, r7, r3
0x07e31bc4 :mov r1, #0 ; 0x0
0x07e31bc8 :cmp r12, #0 ; 0x0
0x07e31bcc :bne 0x7e31c00
0x07e31bd0 :subsr2, r2, r3
0x07e31bd4 :bne 0x7e31b48
0x07e31bd8 :mov r12, #0 ; 0x0
0x07e31bdc :mov r6, r4
0x07e31be0 :ldr r10, [r11, #8]
0x07e31be4 :b 0x7e31c40
0x07e31be8 :ldr r4, [sp, #256]
0x07e31bec :b 0x7e31f08
0x07e31bf