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-7397] Compiler crashes if we add Words.Index == Int to BinaryInteger with Words : Collection #49940

Closed
stephentyrone opened this issue Apr 10, 2018 · 6 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software

Comments

@stephentyrone
Copy link
Member

Previous ID SR-7397
Radar rdar://problem/39316039
Original Reporter @stephentyrone
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee None
Priority Medium

md5: eb0d5b061f10867e4f54c60bc5e0aa78

Issue Description:

If we apply the following change to Integers.swift.gyb:

@@ -1537,7 +1537,7 @@ public protocol BinaryInteger :
///
/// The `Words` type must conform to the `Collection` protocol with an
/// `Element` type of `UInt`.
- associatedtype Words : Sequence where Words.Element == UInt
+ associatedtype Words : Collection where Words.Element == UInt, Words.Index == Int

/// A collection containing the words of this value's binary
/// representation, in order from the least significant to most significant.

then swiftc crashes:

Assertion failed: (Val && "isa<> used on a null pointer"), function doit, file /Users/styrone/Checkouts/swift-source/llvm/include/llvm/Support/Casting.h, line 106.

@stephentyrone
Copy link
Member Author

crash dump attached; this was built with -R, I'll attach another log with a debug build once it finishes.

@belkadan
Copy link
Contributor

@swift-ci create

@belkadan
Copy link
Contributor

Crash in the generic signature builder,

2. While resolving type Unicode._ParsingIterator at [/Users/styrone/Checkouts/swift-source/swift/stdlib/public/core/UnicodeParser.swift:125:11 - line:125:19] RangeText="Unicode.=_"

3. While validating '_ParsingIterator' at /Users/styrone/Checkouts/swift-source/swift/stdlib/public/core/UnicodeParser.swift:110:3

4. While validating '_UnicodeEncoding' at /Users/styrone/Checkouts/swift-source/swift/stdlib/public/core/UnicodeEncoding.swift:13:8

…huh.

@huonw
Copy link
Mannequin

huonw mannequin commented Apr 12, 2018

#15893

@huonw
Copy link
Mannequin

huonw mannequin commented Apr 12, 2018

Merged as 32b2cfc

@AnnaZaks
Copy link
Mannequin

AnnaZaks mannequin commented Jul 26, 2018

@stephentyrone, Could you verify if the problem is fixed and if so move the JIRA to "Closed"?
Thanks!
Anna

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 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 A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software
Projects
None yet
Development

No branches or pull requests

3 participants