[llvm] r251113 - [CodeGen] Mark setjmp/catchret MBBs address-taken
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 7 16:44:41 PST 2015
On Fri, Oct 23, 2015 at 03:06:05PM -0000, Joseph Tremoulet via llvm-commits wrote:
> Author: josepht
> Date: Fri Oct 23 10:06:05 2015
> New Revision: 251113
>
> URL: http://llvm.org/viewvc/llvm-project?rev=251113&view=rev
> Log:
> [CodeGen] Mark setjmp/catchret MBBs address-taken
>
> Modified:
> llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
This part makes the following compile now:
#include <setjmp.h>
#include <stdio.h>
jmp_buf jb;
void t(void) {__builtin_longjmp( jb, 1);}
int jump(void) {(void)(__builtin_setjmp( jb) ? 1 : 0); return 0;}
int
main ()
{
void (*volatile f)(void) = t;
if (!jump()) printf("%d\n", f != 0);
return 0;
}
...which used to fail with a backend error before. As a result, Ruby 2.1
and 2.2 is trying to use the builtins and runs into a segfault later.
At this point, it is not clear whether the change fixed a bug by
accident and exposed a broken __builtin_longjmp / __builtin_setjmp or
just changed the error vector enough to hide the issue.
Joerg
More information about the llvm-commits
mailing list