|
Message-ID: <alpine.LNX.2.20.13.2008121624170.7727@monopod.intra.ispras.ru> Date: Wed, 12 Aug 2020 16:29:59 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com Subject: Re: [PATCH 1/3] setjmp: fix x86-64 longjmp argument adjustment On Tue, 11 Aug 2020, Rich Felker wrote: > Thanks! This whole series looks good and I'm applying it now. > > Re: optimizing the tails, I wonder why they were ever written the way > they were to begin with. At least the i386 one was written by me so > there's nobody else to ask, but do you have any insight into what I > might have been thinking? No idea. 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: #include <setjmp.h> 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.