Displaying 3 results from an estimated 3 matches for "g_pfunc".
Did you mean:
_func
2005 Apr 20
2
[LLVMdev] setjmp, longjmp and unwind
...nd 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 (*g_pfunc) ();
jmp_buf g_jbuf;
long foo() {
printf("Hello World!\n");
longjmp(g_jbuf, 0);
return 0;
}
main () {
g_pfunc = foo;
setjmp(g_jbuf);
g_pfunc();
}
I'm using Mac OS X version 10.3.8
I just installed and build LLVM yesterday from CVS.
2005 Apr 20
0
[LLVMdev] setjmp, longjmp and unwind
...to 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 (*g_pfunc) ();
> jmp_buf g_jbuf;
>
> long foo() {
> printf("Hello World!\n");
> longjmp(g_jbuf, 0);
> return 0;
> }
>
> main () {
> g_pfunc = foo;
>
> setjmp(g_jbuf);
> g_pfunc();
> }
>
> I'm using Mac OS X version 10.3.8
> I...
2005 Apr 20
1
[LLVMdev] setjmp, longjmp and unwind
...lem, 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 (*g_pfunc) ();
>> jmp_buf g_jbuf;
>>
>> long foo() {
>> printf("Hello World!\n");
>> longjmp(g_jbuf, 0);
>> return 0;
>> }
>>
>> main () {
>> g_pfunc = foo;
>>
>> setjmp(g_jbuf);
>> g_pfunc();
>> }...