in the md.h, line 425:
#define MD_GET_SP(_t) (_t)->context[0].__jmpbuf[20]
it will corrupt on debian armhf, for the sp offset is not 20, bug 8.
// /usr/arm-linux-gnueabi/include/bits/setjmp.h
/ The exact set of registers saved may depend on the particular core
in use, as some coprocessor registers may need to be saved. The C
Library ABI requires that the buffer be 8-byte aligned, and
recommends that the buffer contain 64 words. The first 28 words
are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note
that d8-15 require 17 words, due to the use of fstmx.) /
typedef int jmp_buf[64] __attribute((aligned (8)));
0-5: v1-v6
6: sl
7: fp
8: sp
9: pc
10-26: d8-d15 17words
27: fpscr
when I change to:
#define MD_GET_SP(_t) (_t)->context[0].__jmpbuf[8]
it works!
Please provide a preprocessor directive for detecting when the index should be 20 vs. when it should be 8, so fixing it for your platform won't break legacy systems.