[LLVMdev] unsupported GC: shadow-stack when using MCJIT

Philip Reames listmail at philipreames.com
Sun Apr 26 14:49:27 PDT 2015


Just to circle back here, I did a bit more digging.  I'm not entirely 
sure how this is supposed to work - our linking scheme is a bit of a 
mess - but here would be the two things I'd try.

Explicitly include:
#include "llvm/CodeGen/LinkAllCodegenComponents.h"

Call the functions:
initializeCore(*Registry);
initializeCodeGen(*Registry);

What I think is happening is that you're getting into the GCStrategy 
code without having run the initializers for the CodeGen library.  Not 
entirely sure how that's possible, but it appears to be the best 
explanation for the symptoms.

Philip

On 04/02/2015 10:45 AM, Mukul Sabharwal wrote:
> There is a review out, that exposes llvm::linkShadowStackGC to the C 
> bindings.
>
> http://reviews.llvm.org/D8788
>
> On Wed, Apr 1, 2015 at 10:48 AM, Hayden Livingston 
> <halivingston at gmail.com <mailto:halivingston at gmail.com>> wrote:
>
>     This is also happening when using the C++ APIs. It looks like an
>     MCJIT and SetGC interaction.
>
>     I'm lost on how to proceed further.
>
>     On Tue, Mar 31, 2015 at 10:42 PM, Hayden Livingston
>     <halivingston at gmail.com <mailto:halivingston at gmail.com>> wrote:
>
>         The erlang was a typo, I was trying things out.
>
>         I've updated the bug with a C program, which exhibits the problem.
>
>         To answer your question, given the IR you generated llc/opt
>         does not complain.
>
>         On Tue, Mar 31, 2015 at 9:59 PM, Philip Reames
>         <listmail at philipreames.com <mailto:listmail at philipreames.com>>
>         wrote:
>
>             On 03/31/2015 09:52 PM, Philip Reames wrote:
>>
>>>             Maybe it is because I'm using a package that makes an
>>>             LLVM DLL for Windows.
>>>
>>>             The only reason why it show that error is if the static
>>>             constructor for it didn't run, right? And I don't know
>>>             why it would not run.
>>             I need to take a closer look at your bug report before I
>>             can really comment. 
>             Ok, I took a look.  Its hard for me to tell much from your
>             report. I don't have Visual Studios (or Windows for that
>             matter) and can't easily reproduce.
>
>             It would really help to know if this is a problem with the
>             C bindings or the generated IR.  If you manually create
>             the expected IR and run it through opt/llc, does that work?
>
>             Can you include the full output of this example?  Both the
>             IR and the error would be useful to see.
>
>             One observation, it looks like you're using the erlang GC
>             not shadow stack? e.g.
>             LLVM.SetGC(sum, "erlang");
>
>             Philip
>
>
>
>
>     _______________________________________________
>     LLVM Developers mailing list
>     LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>     http://llvm.cs.uiuc.edu
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150426/0c6a09a3/attachment.html>


More information about the llvm-dev mailing list