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-429] Error catching broken on Linux #43046

Closed
lhoward opened this issue Jan 1, 2016 · 4 comments
Closed

[SR-429] Error catching broken on Linux #43046

lhoward opened this issue Jan 1, 2016 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. runtime The Swift Runtime standard library Area: Standard library umbrella

Comments

@lhoward
Copy link
Contributor

lhoward commented Jan 1, 2016

Previous ID SR-429
Radar None
Original Reporter @lhoward
Type Bug
Status Closed
Resolution Cannot Reproduce
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, Runtime
Assignee None
Priority Medium

md5: 05d72a2c343c390d73da15043d56a25f

relates to:

  • SR-377 Implement NSKeyed[Un]Archiver

Issue Description:

This is crashing for me on Linux:

func throwAnError() throws {
    throw NSError(domain: NSCocoaErrorDomain, code: 1234, userInfo: nil)
}

func errorCrasher() -> Void {
    do {
        try throwAnError()
    } catch let error {
        print("\(error)")
    }
}

Backtrace:

* thread #​1: tid = 6603, 0x00007ffff7a95c7c libswiftCore.so`swift::ValueWitnessFlags::getAlignmentMask(this=0x0000000000000090) const + 12 at Metadata.h:152, name = 'serialization', stop reason = signal SIGSEGV: invalid address (fault address: 0x90)
    frame #​0: 0x00007ffff7a95c7c libswiftCore.so`swift::ValueWitnessFlags::getAlignmentMask(this=0x0000000000000090) const + 12 at Metadata.h:152
    frame #​1: 0x00007ffff7a95c5c libswiftCore.so`swift::ValueWitnessTable::getAlignmentMask(this=0x0000000000000000) const + 28 at Metadata.h:649
    frame #​2: 0x00007ffff7a95aa8 libswiftCore.so`swift::SwiftError::getValue(this=0x000000000061a680) const + 104 at ErrorObject.h:103
    frame #​3: 0x00007ffff7ac8cc9 libswiftCore.so`swift::ExistentialTypeMetadata::projectValue(this=0x00007ffff7ff4078, container=0x00007fffffffe040) const + 201 at Metadata.cpp:2164
    frame #​4: 0x00007ffff7a9621d libswiftCore.so`swift::ExistentialTypeMetadata::projectValue(this=0x00007ffff7ff4078, container=0x00007fffffffe040) const + 29 at Metadata.h:1996
    frame #​5: 0x00007ffff7a8a3c6 libswiftCore.so`findDynamicValueAndType(value=0x00007fffffffe040, type=0x00007ffff7ff4078, outValue=0x00007fffffffdc28, outType=0x00007fffffffdc20, inoutCanTake=0x00007fffffffdc1f) + 390 at Casting.cpp:719
    frame #​6: 0x00007ffff7a8a22d libswiftCore.so`swift_getDynamicType(value=0x00007fffffffe040, self=0x00007ffff7ff4078) + 45 at Casting.cpp:758
    frame #&#8203;7: 0x00007ffff783ee76 libswiftCore.so`_print_unlocked<A, B where ...> (value=0x00007fffffffe040, target="") -> () + 70 at OutputStream.swift:173
    frame #&#8203;8: 0x00007ffff77f4b8a libswiftCore.so`String.init<A> (instance=<unavailable>, self="") -> String + 122 at Mirror.swift:787
    frame #&#8203;9: 0x00007ffff77caf2e libswiftCore.so`String.init<A> (expr=<unavailable>, self="") -> String + 78 at StringInterpolation.swift:30
  * frame #&#8203;10: 0x00000000004024bd serialization`errorCrasher() -> () + 221 at main.swift:85
    frame #&#8203;11: 0x0000000000402599 serialization`main() -> Int32 + 9 at main.swift:92
    frame #&#8203;12: 0x000000000040155a serialization`main + 42 at main.swift:138
@lhoward
Copy link
Contributor Author

lhoward commented Jan 1, 2016

Looks like this may not be Foundation-related.

@belkadan
Copy link
Contributor

belkadan commented Jan 4, 2016

@rjmccall, any ideas?

@rjmccall
Copy link
Member

rjmccall commented Jan 4, 2016

Probably something broken in the ErrorType representation on Linux, which is different because of the lack of need to interoperate with NSError. Joe Groff might see something obvious.

@lhoward
Copy link
Contributor Author

lhoward commented Jan 16, 2016

Cannot duplicate with master; closing.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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. runtime The Swift Runtime standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

3 participants