Open KodrAus opened 5 years ago
In that line you reference, if you change LLVMTypeRef.Int8Type
to LLVMTypeRef.Int32Type
does that fix it?
Actually thats not a good idea as it wont match the signature of RhNewObject.
@KodrAus do you have a v6 package or dll that I can reference on Windows to see if I can replicate the problem here?
@yowl As far as I know libLLVM
v6 on Windows is ok, is that not the case? I do have libLLVM
builds being produced as artifacts here, but haven't gotten as far as testing whether the built library actually works yet, so they may be even more broken at the moment :)
@KodrAus the project references 5.0.0:
<PackageReference Include="LLVMSharp">
<Version>5.0.0</Version>
</PackageReference>
Which I understand is libLLVM
5.0.0. I could be wrong as the dll seems to have no version information
I dont think I have permission to get those artifacts from AzureDevops
Which I understand is
libLLVM
5.0.0. I could be wrong as the dll seems to have no version information
Ah, it seems to be explicitly pulling in libLLVM 6.0.0
.
I dont think I have permission to get those artifacts from AzureDevops
Oh thanks for the heads up! I hadn't realised Azure Pipelines would throw a login gate in front of those artifacts. I guess I'd better set up a feed to publish to.
@KodrAus right you are, missed that. BuildAlloca
returns a pointer so maybe that BuildIntCast
can just be dropped, I don't really get why its there.
I think that's pretty much what I did to unblock myself locally:
- var resultAddress = LLVM.BuildIntCast(builder, LLVM.BuildAlloca(builder, LLVM.Int32Type(), "resultAddress"), LLVM.PointerType(LLVMTypeRef.Int8Type(), 0), "castResultAddress");
+ var resultAddress = LLVM.BuildAlloca(builder, LLVM.Int8Type(), "resultAddress");
I wasn't sure if that was actually correct though. At least LLVM seemed ok with it.
Exception handling is something I'm trying to get working and when it is then we can create a test for the null ref handling. Until then it seems reasonable as you have it.
Hi :wave:
I have the following program:
Right now we can't build wasm on OSX (because of #6827), but if I patch in my own working 6.x build of
libLLVM.dylib
(as described here) then I run into a different issue.Running:
where
netapp.ilc.rsp
looks something like this:results in:
with some extra info coming out of
lldb
:The culprit seems to be this operation, where llvm doesn't consider those pointer types to be valid to cast to.