Hi Eskimo, your help is much appreciated :)
I tried running the example code but I get segmentation faults and I am not sure why or how to solve it. Just copy-pasted it into a plain text file named "example.swift" and this is the command line output when I try to run it:
Code Block bashvagrants-iMac:~ root# swift example.swift |
Stack dump: |
0. Program arguments: /Library/Developer/CommandLineTools/usr/bin/swift -frontend -interpret example.swift -enable-objc-interop -stack-check -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -color-diagnostics -module-name example |
1. Apple Swift version 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51) |
2. While running user code "example.swift" |
0 swift 0x0000000106de54ea PrintStackTraceSignalHandler(void*) + 42 |
1 swift 0x0000000106de4cc0 SignalHandler(int) + 352 |
2 libsystem_platform.dylib 0x00007fff66536b1d _sigtramp + 29 |
3 libsystem_platform.dylib 0x00000001085c3000 _sigtramp + 2718483712 |
4 libsystem_platform.dylib 0x000000010ad8e013 _sigtramp + 2760209683 |
5 swift 0x0000000102b6848a llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) + 458 |
6 swift 0x0000000102b6f4fb llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, char const* const*) + 2011 |
7 swift 0x0000000102b445ba performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, bool, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 14362 |
8 swift 0x0000000102b38f75 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 55813 |
9 swift 0x0000000102aaef53 main + 1283 |
10 libdyld.dylib 0x00007fff66331c49 start + 1 |
Segmentation fault: 11 |
Do you have any clue on what can be causing trouble?
thanks in advance for your valuable help :)