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:
bash
vagrants-iMac:~ rootswift example.swift
Stack dump: 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
Apple Swift version 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51)
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::ArrayRefllvm::GenericValue) + 458
6 swift 0x0000000102b6f4fb llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::__1::vectorstd::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar , std::__1::allocatorstd::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const&, char const* const*) + 2011
7 swift 0x0000000102b445ba performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::__1::unique_ptrswift::SILModule, std::__1::default_deleteswift::SILModule , bool, llvm::PointerUnionswift::ModuleDecl*, swift::SourceFile*, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 14362
8 swift 0x0000000102b38f75 swift::performFrontend(llvm::ArrayRefchar 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 :)
Topic:
App & System Services
SubTopic:
Core OS
Tags: