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-4907] Accessing NSNumber.objCType causes SIGSEGV: invalid address on Linux #3856

Closed
norio-nomura opened this issue May 16, 2017 · 1 comment

Comments

@norio-nomura
Copy link
Contributor

Previous ID SR-4907
Radar None
Original Reporter @norio-nomura
Type Bug
Status Resolved
Resolution Done
Environment

swift-4.0-DEVELOPMENT-SNAPSHOT-2017-05-15-a

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

md5: 616cd578425c786df2207ddd8e7cd296

Issue Description:

Expected result:

import Foundation
String(UnicodeScalar(UInt8(NSNumber(value: Int(0)).objCType.pointee))) // "q"

Actual result:

$  docker run --privileged -it -v `pwd`:`pwd` -w `pwd` --rm norionomura/swift:4020170515a swift -I /usr/lib/swift/clang/include
Welcome to Swift version 4.0-dev (LLVM f175cad503, Clang 51f7aba0dc, Swift 79b6334dd8). Type :help for assistance.
  1> import Foundation 
  2. String(UnicodeScalar(UInt8(NSNumber(value: Int(0)).objCType.pointee))) // "q"
Execution interrupted. Enter code to recover and continue.
Enter LLDB commands to investigate (type :help for assistance.)
Process 10 stopped
* thread #​1, name = 'repl_swift', stop reason = signal SIGSEGV: invalid address (fault address: 0x69)
    frame #​0: 0x00007ffff7f7f0a4 $__lldb_expr2`main + 164
$__lldb_expr2`main:
->  0x7ffff7f7f0a4 <+164>: movb   (%r14), %al
    0x7ffff7f7f0a7 <+167>: movb   %al, -0x38(%rbp)
    0x7ffff7f7f0aa <+170>: movabsq $0x7ffff7d80288, %rdx     ; imm = 0x7FFFF7D80288 
    0x7ffff7f7f0b4 <+180>: movabsq $0x7ffff7d6dfa8, %rcx     ; imm = 0x7FFFF7D6DFA8 
Target 0: (repl_swift) stopped.
  3>  
@norio-nomura
Copy link
Contributor Author

Fixed by #1093

@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