There is a known bug in libedit's history file reader that can cause this 
crash.  libedit is a system component that lldb uses to do command-line editing 
and the like.

Try moving ~/.lldb-history to some other name, and then rerunning the REPL.  If 
that works, can you attach that history file to the Radar you mentioned, so we 
can make sure this is the same history reading bug?

Thanks,

Jim
 

> On Oct 6, 2016, at 12:46 PM, Jens Persson via swift-users 
> <swift-users@swift.org> wrote:
> 
> I've filed radar 28657007 and attached the two crashlogs that is generated 
> (one for lldb, and one for repl_swift.
> /Jens
> 
> On Thu, Oct 6, 2016 at 9:25 PM, Jens Persson <j...@bitcycle.com> wrote:
> Here is with Xcode.app:
> 
> › sudo xcode-select -s /Applications/Xcode.app
> Password:
> › 
> › swift -v
> Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
> Target: x86_64-apple-macosx10.9
> /Applications/Xcode.app/Contents/Developer/usr/bin/lldb "--repl=-target 
> x86_64-apple-macosx10.9 -enable-objc-interop -sdk 
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
>  -color-diagnostics"
> Welcome to Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38). 
> Type :help for assistance.
> Segmentation fault: 11
> 
> /Jens
> 
> 
> On Thu, Oct 6, 2016 at 9:23 PM, Jens Persson <j...@bitcycle.com> wrote:
> I was trying both Xcode and Xcode-beta, I just happened to copy paste while 
> Xcode-beta was selected ... Anyway, both of them crash like that.
> /Jens
> 
> 
> On Thu, Oct 6, 2016 at 7:22 PM, Kate Stone <k8st...@apple.com> wrote:
> If you’ve specified “sudo xcode-select -s /Applications/Xcode.app” then it’s 
> surprising that the REPL session is attempting to use the LLDB and SDK from 
> /Applications/Xcode-beta.app.  Can you double-check what “xcode-select -p” 
> reports?
> 
> I can’t say I’ve seen a segmentation fault on REPL launch.  If you see the 
> same behavior once moving to the GM build of Xcode it would definitely be 
> worth filing a radar via bugreport.apple.com with an LLDB crashlog attached 
> to investigate further.
> 
> Kate Stone k8st...@apple.com
>  Xcode Low Level Tools
> 
>> On Oct 6, 2016, at 6:51 AM, Jens Persson via swift-users 
>> <swift-users@swift.org> wrote:
>> 
>> After updating to Sierra I can no longer use the Swift REPL. It crashes 
>> immediately (see Terminal session below). Anyone else having the same 
>> problem, any workaround?
>> 
>> It didn't help to download and reinstall the command line tools for 10.12. 
>> 
>> (I had Xcode 8 and 8.1 beta installed before updating to Sierra. It might 
>> have happened just after I did a sudo xcode-select -s 
>> /Applications/Xcode.app )
>> 
>> See Terminal session below.
>> 
>> /Jens
>> 
>> 
>> › swift
>> Welcome to Apple Swift version 3.0 (swiftlang-800.0.48 clang-800.0.40). Type 
>> :help for assistance.
>> Segmentation fault: 11
>> › 
>> › swift -v
>> Apple Swift version 3.0 (swiftlang-800.0.49 clang-800.0.40)
>> Target: x86_64-apple-macosx10.9
>> /Applications/Xcode-beta.app/Contents/Developer/usr/bin/lldb "--repl=-target 
>> x86_64-apple-macosx10.9 -enable-objc-interop -sdk 
>> /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
>>  -color-diagnostics"
>> Welcome to Apple Swift version 3.0 (swiftlang-800.0.48 clang-800.0.40). Type 
>> :help for assistance.
>> Segmentation fault: 11
>> › 
>> › 
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
>>  -sdk 
>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
>>  -target x86_64-apple-macosx10.12
>> Welcome to Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38). 
>> Type :help for assistance.
>> Segmentation fault: 11
>> 
>> 
>> _______________________________________________
>> swift-users mailing list
>> swift-users@swift.org
>> https://lists.swift.org/mailman/listinfo/swift-users
> 
> 
> 
> 
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to