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

[SR-7193] Segfaults after using KeyPath on array in REPL #4497

Closed
swift-ci opened this issue Mar 14, 2018 · 4 comments
Closed

[SR-7193] Segfaults after using KeyPath on array in REPL #4497

swift-ci opened this issue Mar 14, 2018 · 4 comments
Labels
bug Something isn't working LLDB for Swift REPL

Comments

@swift-ci
Copy link

Previous ID SR-7193
Radar rdar://problem/38461035
Original Reporter dwaite (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

Tested against Xcode 9.3b4 (9Q127n) / Apple Swift version 4.1 (swiftlang-902.0.43 clang-902.0.37.1)

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug, REPL
Assignee None
Priority Medium

md5: d2e5b2c3dce0bca7bc3be3f82ac79b85

is duplicated by:

  • SR-7114 REPL hangs for no apparent reason

Issue Description:

in REPL:

1> let arrayPath=\Array<Int>.count
intArrayPath: KeyPath<[Int], Int> = {
  Swift.PartialKeyPath = {
    Swift.AnyKeyPath =
{       _kvcKeyPathStringPtr = nil     }
  }
}
2> [1,2,3][keyPath: arrayPath]
$R0: Int = 3
3> [1,2,3][keyPath: arrayPath] # Crashes, REPL hangs

Alternatively, merely creating a new KeyPath appears to segfault/hang the system:

3b> let anyArrayPath = \Array<Any>.count
@belkadan
Copy link

Doesn't seem to happen with a normal compiler -> over to LLDB.

@swift-ci create

@belkadan
Copy link

This should be fixed in apple/swift-lldb#635

@AnnaZaks
Copy link
Mannequin

AnnaZaks mannequin commented Jul 26, 2018

dwaite (JIRA User), Could you verify if the problem is fixed and if so move the JIRA to "Closed"?
Thanks!
Anna

@swift-ci
Copy link
Author

Comment by David Waite (JIRA)

Appears fixed (`Apple Swift version 4.2 (swiftlang-1000.0.29 clang-1000.0.39)`)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LLDB for Swift REPL
Projects
None yet
Development

No branches or pull requests

2 participants