* Alexander Monakov [2020-08-12 16:29:59 +0300]: > By the way, you should check if other 64-bit ports in musl exhibit > the same issue. The AArch64 port definitely does, for example. > > Here's a standalone testcase, needs -O2 so test_lj passes its second > argument unchanged: yes it seems wrong, see attached patch (with that the test passes). thanks. > > #include > > static void test_lj(jmp_buf jb, long lv) > { > longjmp(jb, lv); > } > > int main() > { > void (*volatile ptest)(jmp_buf, long) = 0; > jmp_buf jb; > > int v = setjmp(jb); > ptest = ptest ? 0 : test_lj; > if (ptest) ptest(jb, 1l<<32); > return !v; > } > > > Alexander