We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
md5: 1bfc6e33111ae4d440f01f3223dfb22a
Issue Description:
import Foundation
let d = NSDateComponents() d.year = 2018 d.month = 8 d.day = 1 print(d.hash) // Traps with overflow error
The text was updated successfully, but these errors were encountered:
NSCalendar.swift includes the following expression in NSDateComponent.hash:
return calHash + (32832013 * (y + yy) + 2678437 * m + 86413 * d + 3607 * h + 61 * mm + s) + (41 * weekOfYear + 11 * weekOfMonth + 7 * weekday + 3 * weekdayOrdinal + quarter) * (1 << 5)
Sorry, something went wrong.
Fix is submitted in #1645
Tested ok using swift-DEVELOPMENT-SNAPSHOT-2019-01-24-a-ubuntu18.04
swift-DEVELOPMENT-SNAPSHOT-2019-01-24-a-ubuntu18.04
$ ~/swift-DEVELOPMENT-SNAPSHOT-2019-01-24-a-ubuntu18.04/usr/bin/swift error: ld-2.27.so 0xffffffff0005c564: adding range [0x1464a-0x146ba) which has a base that is less than the function's low PC 0x14dc0. Please file a bug and attach the file at the start of this error message error: ld-2.27.so 0xffffffff0005c564: adding range [0x146d0-0x146d6) which has a base that is less than the function's low PC 0x14dc0. Please file a bug and attach the file at the start of this error message error: ld-2.27.so 0xffffffff0005c5c5: adding range [0x1464a-0x146ba) which has a base that is less than the function's low PC 0x14dc0. Please file a bug and attach the file at the start of this error message error: ld-2.27.so 0xffffffff0005c5c5: adding range [0x146d0-0x146d6) which has a base that is less than the function's low PC 0x14dc0. Please file a bug and attach the file at the start of this error message Welcome to Swift version 5.0-dev (LLVM f63b283c71, Clang 41ac4c4262, Swift 6875d77d6f). Type :help for assistance. 1> import Foundation 2. let d = NSDateComponents() 3. d.year = 2018 4. d.month = 8 5. d.day = 1 6. print(d.hash) // Traps with overflow error -2947813404935422364 d: Foundation.NSDateComponents = { Foundation.NSObject = {} _calendar = nil _timeZone = nil _values = 19 values { [0] = 9223372036854775807 [1] = 2018 [2] = 8 [3] = 1 [4] = 9223372036854775807 [5] = 9223372036854775807 [6] = 9223372036854775807 [7] = 9223372036854775807 [8] = 9223372036854775807 [9] = 9223372036854775807 [10] = 9223372036854775807 [11] = 9223372036854775807 [12] = 9223372036854775807 [13] = 9223372036854775807 [14] = 9223372036854775807 [15] = 9223372036854775807 [16] = 9223372036854775807 [17] = 9223372036854775807 [18] = 9223372036854775807 } timeZone = nil } 7>
lorentey
No branches or pull requests
Additional Detail from JIRA
md5: 1bfc6e33111ae4d440f01f3223dfb22a
Issue Description:
import Foundation
let d = NSDateComponents()
d.year = 2018
d.month = 8
d.day = 1
print(d.hash) // Traps with overflow error
The text was updated successfully, but these errors were encountered: