Closed
Description
Previous ID | SR-936 |
Radar | None |
Original Reporter | inket (JIRA User) |
Type | Bug |
Status | Resolved |
Resolution | Done |
Environment
Ubuntu 14.04, Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3de75)
Reproduced on Ubuntu 16.04, Swift version 4.0.1-dev (LLVM 2dedb62a0b, Clang ab7472e733, Swift 7efb2d13a2)
Additional Detail from JIRA
Votes | 3 |
Component/s | Foundation |
Labels | Bug, Linux |
Assignee | @spevans |
Priority | Medium |
md5: bf8cffe9642151374ef9e452574daaaf
relates to:
- SR-1547 NSData causes segmentation fault
Issue Description:
The current implementation of NSData's hash() causes a segmentation fault on Linux.
Using the REPL on Mac:
Welcome to Apple Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3de75). Type :help for assistance.
1> import Foundation
2> "foobar".dataUsingEncoding(NSUTF8StringEncoding)?.hash
$R0: Int? = 114710658
on Linux:
Welcome to Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3de75). Type :help for assistance.
1> import Foundation
2> "foobar".dataUsingEncoding(NSUTF8StringEncoding)?.hash
Execution interrupted. Enter code to recover and continue.