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-4922] CharacterSet.isSubset() crash on Linux #4101

Closed
swift-ci opened this issue May 18, 2017 · 1 comment
Closed

[SR-4922] CharacterSet.isSubset() crash on Linux #4101

swift-ci opened this issue May 18, 2017 · 1 comment

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-4922
Radar None
Original Reporter dram (JIRA User)
Type Bug
Status Resolved
Resolution Cannot Reproduce
Environment

I'm using swift-DEVELOPMENT-SNAPSHOT-2017-05-16-a-ubuntu16.04 on Ubuntu 16.04.

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, Linux, RunTimeCrash
Assignee mattrajca (JIRA)
Priority Medium

md5: ee1b458658abfb91cb45bcce414a0d8c

Issue Description:

Following code will cause crash on Linux:

import Foundation
let set = CharacterSet()
print(set.isSubset(of: set))

From backtrace of the core dump, it seems that it is caused by a stack overflow:

    frame #&#8203;80562: 0x00007f5bb17562be libFoundation.so`Foundation.NSCharacterSet.isEqual(Swift.Optional<Any>) -> Swift.Bool + 414
    frame #&#8203;80563: 0x00007f5bb192c152 libFoundation.so`@objc Foundation._CFSwiftIsEqual(Swift.AnyObject, cf2: Swift.AnyObject) -> Swift.Bool + 114
    frame #&#8203;80564: 0x00007f5bb17562be libFoundation.so`Foundation.NSCharacterSet.isEqual(Swift.Optional<Any>) -> Swift.Bool + 414
    frame #&#8203;80565: 0x00007f5bb192c152 libFoundation.so`@objc Foundation._CFSwiftIsEqual(Swift.AnyObject, cf2: Swift.AnyObject) -> Swift.Bool + 114
    frame #&#8203;80566: 0x00007f5bb17562be libFoundation.so`Foundation.NSCharacterSet.isEqual(Swift.Optional<Any>) -> Swift.Bool + 414
    frame #&#8203;80567: 0x00007f5bb19ec126 libFoundation.so`(extension in Foundation):Foundation._SwiftNativeFoundationType.isEqual(Swift.AnyObject) -> Swift.Bool + 118
    frame #&#8203;80568: 0x00007f5bb1a27228 libFoundation.so`static Foundation.CharacterSet.== infix(Foundation.CharacterSet, Foundation.CharacterSet) -> Swift.Bool + 72
    frame #&#8203;80569: 0x00007f5bb1a2727f libFoundation.so`protocol witness for static Swift.Equatable.== infix(A, A) -> Swift.Bool in conformance Foundation.CharacterSet : Swift.Equatable in Foundation + 15
    frame #&#8203;80570: 0x00007f5bb2060460 libswiftCore.so`(extension in Swift):Swift.SetAlgebra.isSubset(of: A) -> Swift.Bool + 112
    frame #&#8203;80571: 0x00007ffc303c7e79 foo`main + 153
    frame #&#8203;80572: 0x00007f5bb013f830 libc.so.6`__libc_start_main(main=(foo`main), argc=1, argv=0x00007ffc303c2c88, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007ffc303c2c78) at libc-start.c:291
    frame #&#8203;80573: 0x00007ffc303c7cf9 foo`_start + 41
@swift-ci
Copy link
Contributor Author

Comment by Matt Rajca (JIRA)

No longer crashes in the 9/7 toolchain and "true" is printed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
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

1 participant