Hayden Livingston
2015-Apr-01 01:03 UTC
[LLVMdev] unsupported GC: shadow-stack when using MCJIT
Thanks, Philip. I have a sinking feeling it's not your change, but could you share the commit and so I can try it out locally? Bug: https://llvm.org/bugs/show_bug.cgi?id=23095 The reason I think it is not your change is because I tried a shared library build of LLVM 3.5.1 and that also failed with this error. 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. On Tue, Mar 31, 2015 at 5:29 PM, Philip Reames <listmail at philipreames.com> wrote:> Most likely a mistake in one of my recent patches. Can you file a bug > with a test case? I'll try to get this fixed quickly. > > Philip > > On 03/31/2015 01:42 AM, Hayden Livingston wrote: > > I'm getting an error while using a trivial example by just setting a > function's gc to shadow-stack. > > Does anybody know why this could be happening? > > > _______________________________________________ > LLVM Developers mailing listLLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150331/babf7ed6/attachment.html>
Philip Reames
2015-Apr-01 04:52 UTC
[LLVMdev] unsupported GC: shadow-stack when using MCJIT
On 03/31/2015 06:03 PM, Hayden Livingston wrote:> Thanks, Philip. I have a sinking feeling it's not your change, but > could you share the commit and so I can try it out locally? > > Bug: https://llvm.org/bugs/show_bug.cgi?id=23095 > > The reason I think it is not your change is because I tried a shared > library build of LLVM 3.5.1 and that also failed with this error.By recent, I had meant all my changes in this area over the last six months or so. Given that, it's entirely possible something got into 3.5.1. I honestly haven't been tracking the releases closely.> 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. I'm about to do that, but it's worth commenting that the shadow stack GC appears to be working normally on a recent linux build. I ran it on a recent build snapshot from the 26th of March I happened to have lying around. Here's the test code I used: declare void @foo() declare void @llvm.gcroot(i8**, i8*) define void @test(i8* %ptr) gc "shadow-stack" { %slot = alloca i8* call void @llvm.gcroot(i8** %slot, i8* null) store i8* %ptr, i8** %slot call void @foo() %ptr2 = load i8*, i8** %slot store i8 0, i8* %ptr2 ret void }> > On Tue, Mar 31, 2015 at 5:29 PM, Philip Reames > <listmail at philipreames.com <mailto:listmail at philipreames.com>> wrote: > > Most likely a mistake in one of my recent patches. Can you file a > bug with a test case? I'll try to get this fixed quickly. > > Philip > > On 03/31/2015 01:42 AM, Hayden Livingston wrote: >> I'm getting an error while using a trivial example by just >> setting a function's gc to shadow-stack. >> >> Does anybody know why this could be happening? >> >> >> _______________________________________________ >> 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/20150331/326fda13/attachment.html>
Philip Reames
2015-Apr-01 04:59 UTC
[LLVMdev] unsupported GC: shadow-stack when using MCJIT
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150331/d683ff0d/attachment.html>