search for: longjmp

Displaying 20 results from an estimated 510 matches for "longjmp".

2015 Apr 28
2
[LLVMdev] MCJIT longjmp failure on Win64 - was Invalid or unaligned stack exception on Windows
On 28 April 2015 at 00:30, Reid Kleckner <rnk at google.com> wrote: > I think Paweł identified the problem. The frames on the stack between the > setjmp and longjmp must have valid unwind information, which is described > here: > https://msdn.microsoft.com/en-us/library/ft9x1kdx.aspx?f=255&MSPPError=-2147217396 > > In particular, it has this line about JITed code: > "For dynamically generated functions [JIT compilers], the runtime to...
2011 Oct 04
3
[LLVMdev] setjmp - longjmp
Hi, I have some code which has sigsetjmp / longjmp. After a longjmp, unreachable is inserted, which is fine. The problem is that in the backend before calling longjmp, some register was spilled to a stack location which is live across the jmp. I mean, it will be live after jumping. The stack location was initialized before the call to setjmp, and i...
2003 Sep 15
0
LLVM now supports setjmp/longjmp!
Thanks to the hard work of Bill Wendling (wendling at isanbard.org), LLVM now translates setjmp/longjmp calls into the LLVM "exception handling" instructions invoke & unwind. This means that all of the LLVM optimizers are now aware of the extra control flow edges made possible by setjmp & longjmp, so data flow analyses won't make incorrect transformations. A variety of testcas...
2005 Nov 25
0
[LLVMdev] Re: setjmp/longjmp interoperable between llvm and gcc?
...be compiled >> to native code using llvm. It calls, and is called by, the other >> subsystems, many of which have to be compiled using gcc because they >> use small amounts of inline assembly. All of the subsystems catch >> and throw errors to one another using setjmp/longjmp. >> >> When gcc-built code calls longjmp(), the destination might be a >> setjmp() in llvm-built code, and vice versa. At present the >> gcc-built code uses the setjmp/longjmp implementations provided >> by the gnu C library; and presumably the llvm-built code wi...
2005 Nov 21
1
[LLVMdev] setjmp/longjmp interoperable between llvm and gcc?
...stly legacy C code). One subsystem will be compiled to native code using llvm. It calls, and is called by, the other subsystems, many of which have to be compiled using gcc because they use small amounts of inline assembly. All of the subsystems catch and throw errors to one another using setjmp/longjmp. When gcc-built code calls longjmp(), the destination might be a setjmp() in llvm-built code, and vice versa. At present the gcc-built code uses the setjmp/longjmp implementations provided by the gnu C library; and presumably the llvm-built code will use llvm's setjmp/longjmp intrinsics. Are...
2012 Oct 02
2
[PATCH] fix ARM longjmp with zero 'val'.
[klibc] [PATCH] fix ARM longjmp with zero 'val'. We need to set the condition codes on the ARM. The previous version was using a left over condition code from the caller. Also, use conditional execution to eliminate branch and reduce size. Signed-off-by: Bill Pringlemeir <bpringle at sympatico.ca> diff --git a/...
2012 Jul 01
2
[klibc:master] arm/setjmp.S: fix longjmp
...g/?p=libs/klibc/klibc.git;a=commit;h=d7d16afbdae9bdea83aeb26ac572e6fc4d7d4940 Author: Steve McIntyre <steve at einval.com> AuthorDate: Fri, 29 Jun 2012 18:13:34 +0100 Committer: maximilian attems <max at stro.at> CommitDate: Sun, 1 Jul 2012 22:51:00 +0200 [klibc] arm/setjmp.S: fix longjmp There's a real bug in the ARM assembly version of longjmp in usr/klibc/arch/arm/setjmp.S: it will always pass back its first argument as a return value, even if it's 0 (see the man page for more details). Oddly, the Thumb implementation in the same file *is* correct! Signed-off-by: Steve...
2011 Oct 04
2
[LLVMdev] setjmp - longjmp
On Oct 4, 2011, at 3:53 PM, Eli Friedman wrote: > On Tue, Oct 4, 2011 at 3:10 PM, Khaled ElWazeer > <khalid.alwazeer at gmail.com> wrote: >> Hi, >> >> I have some code which has sigsetjmp / longjmp. After a longjmp, unreachable >> is inserted, which is fine. The problem is that in the backend before >> calling longjmp, some register was spilled to a stack location which is live >> across the jmp. I mean, it will be live after jumping. The stack location >> was initiali...
2013 May 08
1
[LLVMdev] Clarifying the state of setjmp/longjmp support in LLVM and Clang
I'm trying to make sense in the support for setjmp/longjmp in Clang and LLVM, with only partial success. I'll try to summarize my findings in the hope that someone can shed some light on why things are the way they are and what I'm missing. Clang. Clang recognizes two forms of setjmp (all I say here applies to longjmp similarly): * __builtin_setj...
2014 May 27
2
[LLVMdev] Do the LLVM SJLJ intrinsics interact with C++ exception handling and execute C++ cleanup actions?
Do the LLVM Setjmp/Longjmp intrinsics interact with C++ exception handling and execute C++ cleanup actions? I compiled a small example using setjmp/longjmp using clang and they did not execute C++ cleanup actions and calling longjmp bypassed calling destructors on objects that were allocated between the call to setjmp and l...
2011 Oct 04
0
[LLVMdev] setjmp - longjmp
On Tue, Oct 4, 2011 at 3:10 PM, Khaled ElWazeer <khalid.alwazeer at gmail.com> wrote: > Hi, > > I have some code which has sigsetjmp / longjmp. After a longjmp, unreachable > is inserted, which is fine. The problem is that in the backend before > calling longjmp, some register was spilled to a stack location which is live > across the jmp. I mean, it will be live after jumping. The stack location > was initialized before the c...
2013 Dec 03
0
[klibc:master] ppc64: Add ppc64le support
...std %r2,0(%r3) /* save TOC pointer (not needed) */ @@ -43,17 +47,28 @@ setjmp: std %r31,8(%r3) li %r3,0 /* indicate success */ blr /* return */ +#if _CALL_ELF == 2 + .size setjmp,.-setjmp +#else + .size setjmp,.-.setjmp +#endif - .size .setjmp,.-.setjmp + .text + .balign 4 + .globl longjmp +#if _CALL_ELF == 2 + .type longjmp, at function +longjmp: +#else .section ".opd","aw" + .balign 8 longjmp: - .quad .longjmp,.TOC. at tocbase,0 + .quad .longjmp, .TOC. at tocbase, 0 .previous - .size longjmp,24 .type .longjmp, at function - .globl longjmp .globl .longjm...
2011 Oct 05
0
[LLVMdev] setjmp - longjmp
...lesen <stoklund at 2pi.dk>wrote: > > On Oct 4, 2011, at 3:53 PM, Eli Friedman wrote: > > > On Tue, Oct 4, 2011 at 3:10 PM, Khaled ElWazeer > > <khalid.alwazeer at gmail.com> wrote: > >> Hi, > >> > >> I have some code which has sigsetjmp / longjmp. After a longjmp, > unreachable > >> is inserted, which is fine. The problem is that in the backend before > >> calling longjmp, some register was spilled to a stack location which is > live > >> across the jmp. I mean, it will be live after jumping. The stack >...
2013 Dec 03
2
[PATCH 1/2] ppc64: Add ppc64le support
...std %r2,0(%r3) /* save TOC pointer (not needed) */ @@ -43,17 +47,28 @@ setjmp: std %r31,8(%r3) li %r3,0 /* indicate success */ blr /* return */ +#if _CALL_ELF == 2 + .size setjmp,.-setjmp +#else + .size setjmp,.-.setjmp +#endif - .size .setjmp,.-.setjmp + .text + .balign 4 + .globl longjmp +#if _CALL_ELF == 2 + .type longjmp, at function +longjmp: +#else .section ".opd","aw" + .balign 8 longjmp: - .quad .longjmp,.TOC. at tocbase,0 + .quad .longjmp, .TOC. at tocbase, 0 .previous - .size longjmp,24 .type .longjmp, at function - .globl longjmp .globl .longjm...
2011 Feb 16
2
fwd: fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.
...S +++ klibc-1.5.20/usr/klibc/arch/arm/setjmp.S @@ -29,7 +29,11 @@ setjmp: stmia r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr} mov r0, #0 +#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__) mov pc, lr +#else + bx lr +#endif .size setjmp,.-setjmp .text @@ -39,7 +43,11 @@ setjmp: longjmp: ldmia r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr} mov r0, r1 +#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__) mov pc, lr +#else + bx lr +#endif .size longjmp,.-longjmp #else /* __thumb__ */ @@ -75,7 +83,11 @@ setjmp: mov r7, sp stmia r0!, {r3, r4, r5, r6, r7} mov r0,...
2005 Apr 20
2
[LLVMdev] setjmp, longjmp and unwind
I'm trying to get unwind to work. I was unable to get an unwind example to work directly, so I decided to compile a c program that uses setjmp and longjmp and work backwards. I keep running into a "Abort trap" problem, whatever "Abort trap" is. Anyway, here's an example of a C program that compiles and works properly under normal gcc, but that fails with an "Abort trap" under LLVM: #include <setjmp.h> long...
2011 Apr 13
0
[LLVMdev] built-in longjmp and setjmp
It seems straightforward to implement, if it just needs to be functionally correct. I have another question about setjmp/longjmp. When the following program is compiled and run with argument 10 (./a.out 10), should it print 10 or 23? I am asking this question because it prints 23 when compiled with gcc and prints 10 when compiled with clang. If it is supposed to return 23, it seems to me that saving and clobbering registers...
2016 Sep 16
2
setjmp/longjmp and volatile stores, but non-volatile loads
Hi, In our (non-C) compiler we use setjmp/longjmp to implement exception handling. For the initial implementation LLVM backend, I'm keeping that model. In order to ensure that changes performed in a try/setjmp==0 block survive the longjmp, the changes must be done via volatile operations. Given that volatility is a property of individual load...
2016 Dec 19
0
setjmp/longjmp and volatile stores, but non-volatile loads
On Sun, Dec 18, 2016 at 02:23:01PM +0100, Jonas Maebe via llvm-dev wrote: > Recap: we use setjmp/longjmp for our exception handling on all platforms in > our regular (non-LLVM) code generators. I'd like to use the same > infrastructure with the LLVM code generator for code interoperability > purposes (the LLVM SjLj personality is not binary-compatible with our > existing setjump/longju...
2011 Oct 05
1
[LLVMdev] setjmp - longjmp
...e: > >> >> On Oct 4, 2011, at 3:53 PM, Eli Friedman wrote: >> >> > On Tue, Oct 4, 2011 at 3:10 PM, Khaled ElWazeer >> > <khalid.alwazeer at gmail.com> wrote: >> >> Hi, >> >> >> >> I have some code which has sigsetjmp / longjmp. After a longjmp, >> unreachable >> >> is inserted, which is fine. The problem is that in the backend before >> >> calling longjmp, some register was spilled to a stack location which is >> live >> >> across the jmp. I mean, it will be live after jump...