Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can swift be running in graalvm? #2897

Closed
libin049 opened this issue Oct 6, 2020 · 7 comments
Closed

Can swift be running in graalvm? #2897

libin049 opened this issue Oct 6, 2020 · 7 comments

Comments

@libin049
Copy link

libin049 commented Oct 6, 2020

Hello, all:
I want running swift in graalvm, but failed. here is my steps. Can swift be running in graalvm? and how?

OS: ubuntu 16.04
Graalvm: graalvm-ce-java8-linux-amd64-20.2.0
hello.swift: as follows

print("hello world")
swiftc hello.swift -emit-bc
lli --lib=/home/lb/swift/swift-5.2.5-RELEASE-ubuntu16.04/usr/lib/swift/linux/libswiftSwiftOnoneSupport.so --lib=/home/lb/swift/swift-5.2.5-RELEASE-ubuntu16.04/usr/lib/swift/linux/libswiftCore.so --lib=/home/lb/swift/swift-5.2.5-RELEASE-ubuntu16.04/usr/lib/swift/linux/libicui18nswift.so.65 --lib=/home/lb/swift/swift-5.2.5-RELEASE-ubuntu16.04/usr/lib/swift/linux/libicuucswift.so.65 --lib=/home/lb/swift/swift-5.2.5-RELEASE-ubuntu16.04/usr/lib/swift/linux/libicudataswift.so.65 hello.bc

some error occur:

ERROR: java.lang.AssertionError: com.oracle.truffle.llvm.runtime.NFIContextExtension$UnsupportedNativeTypeException: unsupported type %{i64, swift.bridge*} in native interop
org.graalvm.polyglot.PolyglotException: java.lang.AssertionError: com.oracle.truffle.llvm.runtime.NFIContextExtension$UnsupportedNativeTypeException: unsupported type %{i64, swift.bridge*} in native interop
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignature(LLVMDispatchNode.java:95)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.bindSymbol(LLVMDispatchNode.java:189)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:299)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:144)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:73)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:48)
	at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute_generic1(LLVMWriteNodeFactory.java:973)
	at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute(LLVMWriteNodeFactory.java:954)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlock.doBlock(LLVMBasicBlockNode.java:176)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNodeFactory$InitializedBlockNodeGen.execute(LLVMBasicBlockNodeFactory.java:49)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:97)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:45)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:76)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:46)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:87)
	at <llvm> main(Unknown)
	at org.graalvm.polyglot.Value.execute(Value.java:454)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.execute(LLVMLauncher.java:253)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.launch(LLVMLauncher.java:75)
	at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:121)
	at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:70)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.main(LLVMLauncher.java:53)
Original Internal Error: 
java.lang.AssertionError: com.oracle.truffle.llvm.runtime.NFIContextExtension$UnsupportedNativeTypeException: unsupported type %{i64, swift.bridge*} in native interop
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignature(LLVMDispatchNode.java:95)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.bindSymbol(LLVMDispatchNode.java:189)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:299)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:144)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:73)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:48)
	at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute_generic1(LLVMWriteNodeFactory.java:973)
	at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute(LLVMWriteNodeFactory.java:954)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlock.doBlock(LLVMBasicBlockNode.java:176)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNodeFactory$InitializedBlockNodeGen.execute(LLVMBasicBlockNodeFactory.java:49)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:97)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:45)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:76)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:46)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:87)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:503)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:480)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:446)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:146)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:393)
	at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:68)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.doDirect(LLVMDispatchNode.java:118)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:187)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:144)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:73)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:48)
	at com.oracle.truffle.llvm.runtime.nodes.api.LLVMExpressionNode.executeI32(LLVMExpressionNode.java:86)
	at com.oracle.truffle.llvm.runtime.nodes.others.LLVMValueProfilingNodeFactory$LLVMI32ProfiledValueNodeGen.executeGeneric(LLVMValueProfilingNodeFactory.java:377)
	at com.oracle.truffle.llvm.runtime.nodes.api.LLVMFrameNullerExpression.doGeneric(LLVMFrameNullerExpression.java:72)
	at com.oracle.truffle.llvm.runtime.nodes.api.LLVMFrameNullerExpressionNodeGen.executeGeneric(LLVMFrameNullerExpressionNodeGen.java:43)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:70)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:48)
	at com.oracle.truffle.llvm.runtime.nodes.api.LLVMVoidStatementNodeGen.execute(LLVMVoidStatementNodeGen.java:43)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlock.doBlock(LLVMBasicBlockNode.java:176)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNodeFactory$InitializedBlockNodeGen.execute(LLVMBasicBlockNodeFactory.java:49)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:97)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:45)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:76)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:46)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:87)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:503)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:480)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:446)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:146)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:393)
	at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:68)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMGlobalRootNode.executeWithoutFrame(LLVMGlobalRootNode.java:87)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMGlobalRootNode.execute(LLVMGlobalRootNode.java:77)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:503)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:480)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:446)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:146)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:393)
	at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:68)
	at com.oracle.truffle.llvm.runtime.SulongLibrary$Execute.doCached(SulongLibrary.java:177)
	at com.oracle.truffle.llvm.runtime.SulongLibraryGen$InteropLibraryExports$Cached.executeAndSpecialize(SulongLibraryGen.java:137)
	at com.oracle.truffle.llvm.runtime.SulongLibraryGen$InteropLibraryExports$Cached.execute(SulongLibraryGen.java:102)
	at com.oracle.truffle.api.interop.InteropLibraryGen$CachedDispatch.execute(InteropLibraryGen.java:4562)
	at com.oracle.truffle.polyglot.PolyglotValue$InteropCodeCache$AbstractExecuteNode.executeShared(PolyglotValue.java:1894)
	at com.oracle.truffle.polyglot.PolyglotValue$InteropCodeCache$ExecuteNoArgsNode.executeImpl(PolyglotValue.java:2001)
	at com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:101)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:503)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:480)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:446)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:146)
	at org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callProfiled(GraalRuntimeSupport.java:154)
	at com.oracle.truffle.polyglot.PolyglotValue$InteropValue.execute(PolyglotValue.java:2789)
	at org.graalvm.polyglot.Value.execute(Value.java:454)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.execute(LLVMLauncher.java:253)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.launch(LLVMLauncher.java:75)
	at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:121)
	at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:70)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.main(LLVMLauncher.java:53)
Caused by: com.oracle.truffle.llvm.runtime.NFIContextExtension$UnsupportedNativeTypeException: unsupported type %{i64, swift.bridge*} in native interop
	at com.oracle.truffle.llvm.runtime.NFIContextExtension.getNativeType(NFIContextExtension.java:264)
	at com.oracle.truffle.llvm.runtime.NFIContextExtension.getNativeSignature(NFIContextExtension.java:355)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignature(LLVMDispatchNode.java:92)
	... 72 more
Caused by: Attached Guest Language Frames (4)

I also try it in macOS

OS: macOS 11.0 beta
Graalvm: graalvm-ce-java8-darwin-amd64-20.2.0

however, when run export LLVM_TOOLCHAIN=$(lli --print-toolchain-path), an error occurs:

Library "/usr/lib/libSystem.B.dylib" does not exist.
@libin049
Copy link
Author

libin049 commented Oct 6, 2020

I found /usr/lib/libSystem.B.dylib does not exist in macos 11.0. It exists in macOS 10.x.
So graalvm cannot running in macOS 11.0, right?

@oubidar-Abderrahim
Copy link
Member

So graalvm cannot running in macOS 11.0, right?

Currently, yes. GraalVM cannot be run on macOS Big Sur 11.
As mentioned in the release notes of macOS 11 the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail.

An Internal issue was created for the Dev team to fix this issue

@oubidar-Abderrahim
Copy link
Member

@libin049 could you provide a reproducer for Library "/usr/lib/libSystem.B.dylib" does not exist.?
it will help speed up the investigation

@libin049
Copy link
Author

libin049 commented Oct 7, 2020

@oubidar-Abderrahim Sure!
I follow the guidelines 'https://www.graalvm.org/docs/getting-started-with-graalvm/macos/'.
OS: macOS 11.0 beta
Graalvm: graalvm-ce-java8-darwin-amd64-20.2.0

Steps:

  1. download graalvm-ce-java8-darwin-amd64-20.2.0.tar.gz
  2. tar -xvf graalvm-ce-java8-darwin-amd64-20.2.0.tar.gz
  3. sudo mv graalvm-ce-java8-20.2.0 /Library/Java/JavaVirtualMachines
  4. export PATH=/Library/Java/JavaVirtualMachines/graalvm-ce-java8-20.2.0/Contents/Home/bin:$PATH
  5. export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java8-20.2.0/Contents/Home
  6. gu install llvm-toolchain
  7. export LLVM_TOOLCHAIN=$(lli --print-toolchain-path)

then the error occurs:

Library "/usr/lib/libSystem.B.dylib" does not exist.

@oubidar-Abderrahim
Copy link
Member

Thank you @libin049
I added the reproducer to the internal ticket

@oubidar-Abderrahim
Copy link
Member

oubidar-Abderrahim commented Nov 16, 2020

Answering the first question:

Can swift be running in graalvm?

Using LLVM it should be possible. I don't have prior experience with Swift and cannot provide much help on how to do it but as I mentioned in #2905 (comment) It should be possible.

For the issue with Big Sur:
As I mentioned earlier an internal ticket was created for this (GR-26569). Issue #2984 is technically a duplicate of this one, but since the other issue is clearer and easier to find by search. I am going to close this one and switch tracking of this issue to #2984

@vmutafov
Copy link

@oubidar-Abderrahim I'm not sure if this issue should have been closed. At least on my machine, the initial problem still exists:

ERROR: com.oracle.truffle.api.CompilerDirectives$ShouldNotReachHere
org.graalvm.polyglot.PolyglotException: com.oracle.truffle.api.CompilerDirectives$ShouldNotReachHere
	at com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:570)
	at com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:542)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignatureSource(LLVMDispatchNode.java:132)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.bindSymbol(LLVMDispatchNode.java:272)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:437)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:214)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:82)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:28)
	at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute_generic1(LLVMWriteNodeFactory.java:1030)
	at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute(LLVMWriteNodeFactory.java:1007)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlockNode.execute(LLVMBasicBlockNode.java:172)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:99)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:23)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:81)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:25)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:93)
	at <llvm> main(Unknown)
	at org.graalvm.polyglot.Value.execute(Value.java:839)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.execute(LLVMLauncher.java:254)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.launch(LLVMLauncher.java:75)
	at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:295)
	at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:121)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.main(LLVMLauncher.java:53)
Original Internal Error: 
com.oracle.truffle.api.CompilerDirectives$ShouldNotReachHere
	at com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:570)
	at com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:542)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignatureSource(LLVMDispatchNode.java:132)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.bindSymbol(LLVMDispatchNode.java:272)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:437)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:214)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:82)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:28)
	at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute_generic1(LLVMWriteNodeFactory.java:1030)
	at com.oracle.truffle.llvm.runtime.nodes.vars.LLVMWriteNodeFactory$LLVMWritePointerNodeGen.execute(LLVMWriteNodeFactory.java:1007)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlockNode.execute(LLVMBasicBlockNode.java:172)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:99)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:23)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:81)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:25)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:93)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:655)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:627)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:560)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:121)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTargetInstalledCode.doInvoke(SubstrateOptimizedCallTargetInstalledCode.java:176)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:104)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:486)
	at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.doDirectFunction(LLVMDispatchNode.java:180)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeAndSpecialize(LLVMDispatchNodeGen.java:316)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNodeGen.executeDispatch(LLVMDispatchNodeGen.java:214)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:82)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:28)
	at com.oracle.truffle.llvm.runtime.nodes.api.LLVMFrameNullerExpression.doGeneric(LLVMFrameNullerExpression.java:71)
	at com.oracle.truffle.llvm.runtime.nodes.api.LLVMFrameNullerExpressionNodeGen.executeGeneric(LLVMFrameNullerExpressionNodeGen.java:20)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode.doCall(LLVMCallNode.java:79)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNodeGen.executeGeneric(LLVMCallNodeGen.java:28)
	at com.oracle.truffle.llvm.runtime.nodes.api.LLVMVoidStatementNodeGen.execute(LLVMVoidStatementNodeGen.java:22)
	at com.oracle.truffle.llvm.runtime.nodes.base.LLVMBasicBlockNode$InitializedBlockNode.execute(LLVMBasicBlockNode.java:172)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNode.doDispatch(LLVMDispatchBasicBlockNode.java:99)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMDispatchBasicBlockNodeGen.executeGeneric(LLVMDispatchBasicBlockNodeGen.java:23)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNode.doRun(LLVMFunctionRootNode.java:81)
	at com.oracle.truffle.llvm.runtime.nodes.control.LLVMFunctionRootNodeGen.executeGeneric(LLVMFunctionRootNodeGen.java:25)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:93)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:655)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:627)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:560)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:121)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTargetInstalledCode.doInvoke(SubstrateOptimizedCallTargetInstalledCode.java:176)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:104)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:486)
	at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMGlobalRootNode.executeWithoutFrame(LLVMGlobalRootNode.java:88)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMGlobalRootNode.execute(LLVMGlobalRootNode.java:77)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:655)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:627)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:560)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:121)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTargetInstalledCode.doInvoke(SubstrateOptimizedCallTargetInstalledCode.java:176)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:104)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:486)
	at org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
	at com.oracle.truffle.llvm.runtime.SulongLibrary$Execute.doCached(SulongLibrary.java:235)
	at com.oracle.truffle.llvm.runtime.SulongLibraryGen$InteropLibraryExports$Cached.executeAndSpecialize(SulongLibraryGen.java:154)
	at com.oracle.truffle.llvm.runtime.SulongLibraryGen$InteropLibraryExports$Cached.execute(SulongLibraryGen.java:114)
	at com.oracle.truffle.api.interop.InteropLibraryGen$CachedDispatch.execute(InteropLibraryGen.java:7588)
	at com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue$AbstractExecuteNode.executeShared(PolyglotValueDispatch.java:4234)
	at com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue$ExecuteNoArgsNode.executeImpl(PolyglotValueDispatch.java:4341)
	at com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:125)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:655)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:627)
	at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:560)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.invokeCallBoundary(SubstrateOptimizedCallTarget.java:121)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTargetInstalledCode.doInvoke(SubstrateOptimizedCallTargetInstalledCode.java:176)
	at com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget.doInvoke(SubstrateOptimizedCallTarget.java:104)
	at org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callProfiled(GraalRuntimeSupport.java:235)
	at com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue.execute(PolyglotValueDispatch.java:2377)
	at org.graalvm.polyglot.Value.execute(Value.java:839)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.execute(LLVMLauncher.java:254)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.launch(LLVMLauncher.java:75)
	at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:295)
	at org.graalvm.launcher.AbstractLanguageLauncher.launch(AbstractLanguageLauncher.java:121)
	at com.oracle.truffle.llvm.launcher.LLVMLauncher.main(LLVMLauncher.java:53)
Caused by: com.oracle.truffle.llvm.runtime.NativeContextExtension$UnsupportedNativeTypeException: unsupported type %{swift.bridge*, i8*} in native interop
	at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension.getNativeType(NFIContextExtension.java:418)
	at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension.getNativeSignature(NFIContextExtension.java:595)
	at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension.access$000(NFIContextExtension.java:72)
	at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension$SignatureSourceCache.getSignatureSource(NFIContextExtension.java:163)
	at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension$SignatureSourceCache.getSignatureSourceSkipStackArg(NFIContextExtension.java:156)
	at com.oracle.truffle.llvm.nativemode.runtime.NFIContextExtension.getNativeSignatureSourceSkipStackArg(NFIContextExtension.java:550)
	at com.oracle.truffle.llvm.runtime.nodes.func.LLVMDispatchNode.getSignatureSource(LLVMDispatchNode.java:130)
	... 76 more
Caused by: Attached Guest Language Frames (4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants