[llvm] r251113 - [CodeGen] Mark setjmp/catchret MBBs address-taken
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 07:16:03 PST 2015
On Sun, Nov 08, 2015 at 01:44:41AM +0100, Joerg Sonnenberger via llvm-commits wrote:
> 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.
Further hunting shows that the Ruby failure is actually a bug in Ruby.
It is missing some volatile markers and there are some differences in
the spilling logic now. We really need -Wclobber :(
Joerg
More information about the llvm-commits
mailing list