Date: Tue, 1 Aug 2017 08:28:27 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com Subject: Re: possible bug in setjmp implementation for ppc64 On Tue, 1 Aug 2017, Bobby Bingham wrote: > I think this either requires having different versions of setjmp/longjmp > for static and dynamic libc, Do you mean for non-pic vs pic objects? As I understand, when libc.a is built with -fpic (so it's suitable for static-pie), setjmp-longjmp need to preserve saved TOC at (r1+24). So presumably source code would need to test #ifdef __PIC__? > or to increase the size of jmpbuf so we can always save/restore both > r2 and the value on the stack, but this would be an ABI change. Would that work for non-pic, i.e. is (r1+24) a reserved location even in non-pic mode? If not, you can't overwrite it from longjmp. 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.