[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lightning] Segfault on arm when calling jit_disassemble
From: |
Paulo César Pereira de Andrade |
Subject: |
Re: [Lightning] Segfault on arm when calling jit_disassemble |
Date: |
Fri, 4 Apr 2014 19:39:09 -0300 |
2014-04-04 18:51 GMT-03:00 Domingo Alvarez Duarte <address@hidden>:
> Hello !
Hi,
> I'm testing lightning on arm and the printf.c example that come in the docs
> folder segfaults when calling jit_disassemble, also there is no bugtracker
Thanks for reporting this problem. It was a side effect of a change done
long ago when zeroing freed pointers. Just in case, after the correction
I see this on armv7hl:
$ ./printf
generated 52 bytes
# :printf.c:17
0x2abbe000 stmia r0!, {r0}
0x2abbe002 b.n 0x2abbe524
0x2abbe004 vrhadd.u16 d14, d12, d31
0x2abbe008 stmdb sp!, {r4, r5, r6, r7, r8, r9, fp, lr}
0x2abbe00c vpush {d8-d15}
0x2abbe010 stmdb sp!, {r0, r1, r2, r3}
0x2abbe014 mov fp, sp
0x2abbe016 sub.w sp, sp, #0
0x2abbe01a mov r5, r0
0x2abbe01c movw r0, #35604 ; 0x8b14
0x2abbe020 mov r1, r5
0x2abbe022 movw ip, #34704 ; 0x8790
0x2abbe026 blx ip
0x2abbe028 add.w sp, fp, #16
0x2abbe02c vpop {d8-d15}
0x2abbe030 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, fp, pc}
The correction is to call jit_disassemble before jit_clear_state,
in doc/printf.c, because jit_clear_state actually release memory
used by disassemble printing.
> to resgister bugs ???
I am sorry that the project is quite small, and only the mailing list
is used to report bugs :-(
I have a pending new lightning release, and will add this correction
also.
Thanks,
Paulo