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-10776] Calling XMLDocument's var name: String? induces runtime crash on Linux. #3330

Closed
YOCKOW opened this issue May 26, 2019 · 2 comments

Comments

@YOCKOW
Copy link
Collaborator

YOCKOW commented May 26, 2019

Previous ID SR-10776
Radar None
Original Reporter @YOCKOW
Type Bug
Status Resolved
Resolution Done
Environment

Swift 5.0.1
Ubuntu 18.04

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, RunTimeCrash
Assignee @YOCKOW
Priority Medium

md5: 2dbda6a18247e0609926b22b99df2e8a

Issue Description:

The code below can be compiled, but runtime crash occurs with segfault on Linux.

import Foundation

let doc = XMLDocument(rootElement: nil)
print(doc.name)

[Result on REPL]

Process 3697 stopped
* thread #​1, name = 'repl_swift', stop reason = signal SIGSEGV: invalid address (fault address: 0x100000017)
    frame #​0: 0x00007ffff3e15a2b libFoundation.so`_CFXMLNodeCopyName + 43
libFoundation.so`_CFXMLNodeCopyName:
->  0x7ffff3e15a2b <+43>: movq   0x18(%rax), %rsi
    0x7ffff3e15a2f <+47>: jmp    0x7ffff3e15a33            ; <+51>
    0x7ffff3e15a31 <+49>: xorl   %esi, %esi
    0x7ffff3e15a33 <+51>: xorl   %r14d, %r14d
Target 0: (repl_swift) stopped.
doc: Foundation.XMLDocument = <extracting data from value failed>
@YOCKOW
Copy link
Collaborator Author

YOCKOW commented May 29, 2019

PR#2316

@YOCKOW
Copy link
Collaborator Author

YOCKOW commented Aug 16, 2019

#2316 has been merged into master: 482a27a

@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