Skip to content

SR-5289: Teach Mirror how to handle unowned/unmanaged references #28368

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

Merged
merged 21 commits into from
Dec 16, 2019

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Nov 19, 2019

This adds support to Mirror to correctly reflect unowned and unmanaged (aka unowned(unsafe)) references, including tests that verify reflection of such fields containing references to ObjC or Swift objects (including via existentials).

Resolves SR-5289.

Test that we can reflect weak, unowned, and unmanaged references
to both Swift and Obj-C types (including existential references to
such types) that occur in both Swift class objects and in Swift
structs.

This includes the specific reported case (unowned reference to an
Obj-C object).
TypeReferenceOwnership here is a bitmap indicating which of
the various ownership modifiers (weak, unowned, unmanaged)
were present on the field declaration.  Making this a bitmap
ensures that we can accurately represent the data that may
have been provided but we have to be careful when we interpret
the result.

This changes the `isWeak`, `isUnowned`, `isUnmanged` checks to
only return true if exactly one bit is set.  Combinations of bits
will not be accepted.

Also, add `isStrong` to check for the default ownership with
no modifiers.
This involves refactoring how we handle reference ownership
when reflecting fields of struct and class objects:

* Move FieldType into ReflectionMirror.mm
  FieldType is really just an internal implementation detail
	of this one source file, so it does not belong in an ABI header.

* Use TypeReferenceOwnership directly to track field ownership
  This avoids bitwise copying of properties and localizes some
	of the knowledge about reference ownership

* Generate a top-level "copyFieldContents" from ReferenceStorage.def
  Adding new ownership types to ReferenceStorage.def will now
	automatically produce calls to `copy*FieldContents` - failure
	to provide a suitable implementation will fail the build.

* Implement `copyUnownedFieldContents` and `copyUnmanagedFieldContents`
@tbkka
Copy link
Contributor Author

tbkka commented Nov 19, 2019

@swift-ci Please test

Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 5398cef

Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't listen to these mad fools who keep approving this PR. :)

@mikeash
Copy link
Contributor

mikeash commented Nov 20, 2019

Hey, my approval comes with an implicit "Do the stuff John says first."

I won't dispute "mad fool" though.

@tbkka
Copy link
Contributor Author

tbkka commented Nov 21, 2019

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 5398cef

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 5398cef

@tbkka
Copy link
Contributor Author

tbkka commented Nov 21, 2019

@swift-ci Please test Linux Platform

@tbkka
Copy link
Contributor Author

tbkka commented Nov 21, 2019

@rjmccall - I believe I've addressed your concerns.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 28f662b

@tbkka
Copy link
Contributor Author

tbkka commented Nov 21, 2019

Seems I need to go debug this on Linux:

12:07:42 [ RUN      ] Mirrors.Weak and Unowned Swift refs in class
12:07:42 stderr>>> Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/stdlib/Output/Mirror.swift.tmp/main.swift, line 557
12:07:42 stderr>>> Current stack trace:
12:07:42 stderr>>> 0    libswiftCore.so                    0x00007ff70fb21000 swift_reportError + 50
12:07:42 stderr>>> 1    libswiftCore.so                    0x00007ff70fb92670 _swift_stdlib_reportFatalErrorInFile + 115
12:07:42 stderr>>> 2    libswiftCore.so                    0x00007ff70f89be95 <unavailable> + 1384085
12:07:42 stderr>>> 3    libswiftCore.so                    0x00007ff70f89b9b7 <unavailable> + 1382839
12:07:42 stderr>>> 4    libswiftCore.so                    0x00007ff70f89b683 <unavailable> + 1382019
12:07:42 stderr>>> 5    libswiftCore.so                    0x00007ff70f89af40 _assertionFailure(_:_:file:line:flags:) + 525
12:07:42 stderr>>> 6    Mirror                             0x00005631adcd5e38 <unavailable> + 122424
12:07:42 stderr>>> 7    Mirror                             0x00005631adcd47a8 <unavailable> + 116648
12:07:42 stderr>>> 8    Mirror                             0x00005631adcd70a3 <unavailable> + 127139
12:07:42 stderr>>> 9    libswiftStdlibUnittest.so          0x00007ff70fe2323b <unavailable> + 180795
12:07:42 stderr>>> 10   libswiftStdlibUnittest.so          0x00007ff70fe22af3 <unavailable> + 178931
12:07:42 stderr>>> 11   Mirror                             0x00005631adcc7518 <unavailable> + 62744
12:07:42 stderr>>> 12   libc.so.6                          0x00007ff70ea73740 __libc_start_main + 240
12:07:42 stderr>>> 13   Mirror                             0x00005631adcc27c9 <unavailable> + 42953
12:07:42 stderr>>> CRASHED: SIGILL
12:07:42 the test crashed unexpectedly

…alIn`

Balanced calls here help ensure we use consistent memory management.
Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks great to me, thanks!

@tbkka
Copy link
Contributor Author

tbkka commented Nov 22, 2019

@swift-ci Please smoke test

1 similar comment
@tbkka
Copy link
Contributor Author

tbkka commented Dec 2, 2019

@swift-ci Please smoke test

@tbkka
Copy link
Contributor Author

tbkka commented Dec 3, 2019

Linux CI is failing in my new test. Unfortunately, I've not been able to reproduce the failure locally on Ubuntu 16, 18, or macOS. So I've added some more detailed logging and verification to try to narrow the issue.

@tbkka
Copy link
Contributor Author

tbkka commented Dec 3, 2019

@swift-ci Please smoke test Linux

tbkka added 3 commits December 5, 2019 20:46
I had to fix this in order to test the Mirror support changes.

Weak properties are optionals, and reflection packages things
in Any containers, so it's hard to test reflecting weak
properties without being able to cast the result back
to the original type.
@tbkka
Copy link
Contributor Author

tbkka commented Dec 6, 2019

The tests were failing on Linux because the casts I was using in the test were broken. (They worked by accident on macOS because on macOS there's a last-resort path that defers the cast onto the Obj-C runtime.) So I implemented the necessary casts, including tests for the casts themselves.

@tbkka
Copy link
Contributor Author

tbkka commented Dec 6, 2019

@swift-ci Please test

tbkka added 5 commits December 6, 2019 16:02
In particular, a null type at this point indicates that
the cast has already been checked and is known to be valid.
If this works, I should be able to factor out the common
unwrap logic here.
This reverts commit 0e86b31.

Trying to fix the casting inconsistencies is turning out
to be a lot more complex than I thought.  Let's roll back
to just the Mirror fix so that can be merged before I take
off on a lengthy tangent.
@tbkka
Copy link
Contributor Author

tbkka commented Dec 11, 2019

I've backed out the casting changes from this branch. They were not strictly necessary for the core bug here, and had too many repercussions. Instead, I'll find some other way to verify the functionality on Linux and pick up the casting changes elsewhere.

@tbkka
Copy link
Contributor Author

tbkka commented Dec 13, 2019

For now, I've commented out the checks that relied on broken casts. If swift-ci passes, then I think this is (finally) good to go.

@tbkka
Copy link
Contributor Author

tbkka commented Dec 13, 2019

@swift-ci Please test macOS

@tbkka
Copy link
Contributor Author

tbkka commented Dec 13, 2019

@swift-ci Please test Linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 28f662b

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 28f662b

@tbkka tbkka merged commit 9c638ae into swiftlang:master Dec 16, 2019
@shahmishal
Copy link
Member

Test failed on Swift in the OS bot (10.14.5)

https://ci.swift.org/job/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/976/console

FAIL: Swift(macosx-x86_64) :: stdlib/Mirror.swift (7559 of 12441)
******************** TEST 'Swift(macosx-x86_64) :: stdlib/Mirror.swift' FAILED ********************
Script:
--
: 'RUN: at line 12';   rm -rf "/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp" && mkdir -p "/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp"
: 'RUN: at line 13';   cp /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/swift/test/stdlib/Mirror.swift /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/main.swift
: 'RUN: at line 15';   if [ objc == "objc" ];  then    xcrun --toolchain default --sdk '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk' clang++ -arch x86_64 -mmacosx-version-min=10.9 -fmodules-cache-path='/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/swift-test-results/x86_64-apple-macosx10.9/clang-module-cache' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/swift/test/stdlib/Inputs/Mirror/Mirror.mm -c -o /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/Mirror.mm.o -g &&    xcrun --toolchain default --sdk '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/bin/swiftc -target x86_64-apple-macosx10.9  -module-cache-path '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/swift-test-results/x86_64-apple-macosx10.9/clang-module-cache' -F '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks' -toolchain-stdlib-rpath -Xlinker -rpath -Xlinker '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks'  -swift-version 4  -Xfrontend -ignore-module-source-info  -F '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib' -Xlinker -rpath -Xlinker '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/main.swift /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/swift/test/stdlib/Inputs/Mirror/MirrorOther.swift -I /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/swift/test/stdlib/Inputs/Mirror/ -Xlinker /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/Mirror.mm.o -o /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/Mirror;  else    xcrun --toolchain default --sdk '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/bin/swiftc -target x86_64-apple-macosx10.9  -module-cache-path '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/swift-test-results/x86_64-apple-macosx10.9/clang-module-cache' -F '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks' -toolchain-stdlib-rpath -Xlinker -rpath -Xlinker '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks'  -swift-version 4  -Xfrontend -ignore-module-source-info  -F '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib' -Xlinker -rpath -Xlinker '/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/main.swift /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/swift/test/stdlib/Inputs/Mirror/MirrorOther.swift -o /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/Mirror;  fi
: 'RUN: at line 22';   codesign -f -s - /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/Mirror
: 'RUN: at line 23';   /usr/bin/env DYLD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx' LD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx:' SIMCTL_CHILD_DYLD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx'  /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/Mirror
--
Exit Code: 134

Command Output (stdout):
--
[ RUN      ] Mirrors.RandomAccessStructure
[       OK ] Mirrors.RandomAccessStructure
[ RUN      ] Mirrors.ForwardStructure
[       OK ] Mirrors.ForwardStructure
[ RUN      ] Mirrors.BidirectionalStructure
[       OK ] Mirrors.BidirectionalStructure
[ RUN      ] Mirrors.LabeledStructure
[       OK ] Mirrors.LabeledStructure
[ RUN      ] Mirrors.Legacy
[       OK ] Mirrors.Legacy
[ RUN      ] Mirrors.ClassReflection
[       OK ] Mirrors.ClassReflection
[ RUN      ] Mirrors.Class/Root/Uncustomized
[       OK ] Mirrors.Class/Root/Uncustomized
[ RUN      ] Mirrors.Class/Root/superclass:.generated
[       OK ] Mirrors.Class/Root/superclass:.generated
[ RUN      ] Mirrors.class/Root/superclass:<default>
[       OK ] Mirrors.class/Root/superclass:<default>
[ RUN      ] Mirrors.class/Plain/Plain
[       OK ] Mirrors.class/Plain/Plain
[ RUN      ] Mirrors.class/UncustomizedSuper/Synthesized/Implicit
[       OK ] Mirrors.class/UncustomizedSuper/Synthesized/Implicit
[ RUN      ] Mirrors.class/UncustomizedSuper/Synthesized/Explicit
[       OK ] Mirrors.class/UncustomizedSuper/Synthesized/Explicit
[ RUN      ] Mirrors.class/CustomizedSuper/Synthesized
[       OK ] Mirrors.class/CustomizedSuper/Synthesized
[ RUN      ] Mirrors.class/ObjCPlain/Plain
[       OK ] Mirrors.class/ObjCPlain/Plain
[ RUN      ] Mirrors.class/ObjCUncustomizedSuper/Synthesized/Implicit
[       OK ] Mirrors.class/ObjCUncustomizedSuper/Synthesized/Implicit
[ RUN      ] Mirrors.class/ObjCUncustomizedSuper/Synthesized/Explicit
[       OK ] Mirrors.class/ObjCUncustomizedSuper/Synthesized/Explicit
[ RUN      ] Mirrors.class/ObjCCustomizedSuper/Synthesized
[       OK ] Mirrors.class/ObjCCustomizedSuper/Synthesized
[ RUN      ] Mirrors.ObjC
[       OK ] Mirrors.ObjC
[ RUN      ] Mirrors.struct/WrapNSArray
[       OK ] Mirrors.struct/WrapNSArray
[ RUN      ] Mirrors.Weak and Unowned Obj-C refs in class (SR-5289)
stdout>>> check failed at /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/main.swift, line 552
stdout>>> expected optional to be non-nil
stderr>>> Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/main.swift, line 553
stderr>>> CRASHED: SIGILL
the test crashed unexpectedly
[     FAIL ] Mirrors.Weak and Unowned Obj-C refs in class (SR-5289)
[ RUN      ] Mirrors.Weak and Unowned Obj-C refs in struct
stdout>>> check failed at /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/main.swift, line 552
stdout>>> expected optional to be non-nil
stderr>>> Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/main.swift, line 553
stderr>>> CRASHED: SIGILL
the test crashed unexpectedly
[     FAIL ] Mirrors.Weak and Unowned Obj-C refs in struct
[ RUN      ] Mirrors.Weak and Unowned Swift refs in class
stdout>>> strong_class Mirror.WeakUnownedSwiftClass
stdout>>> strong_existential Mirror.WeakUnownedSwiftClass
stdout>>> weak_class Optional(Mirror.WeakUnownedSwiftClass)
stdout>>> weak_existential Optional(Mirror.WeakUnownedSwiftClass)
stdout>>> unowned_safe_class Mirror.WeakUnownedSwiftClass
stdout>>> unowned_safe_existential Mirror.WeakUnownedSwiftClass
stdout>>> unowned_unsafe_class Mirror.WeakUnownedSwiftClass
stdout>>> unowned_unsafe_existential Mirror.WeakUnownedSwiftClass
[       OK ] Mirrors.Weak and Unowned Swift refs in class
[ RUN      ] Mirrors.Weak and Unowned Swift refs in struct
stdout>>> strong_class Mirror.WeakUnownedSwiftClass
stdout>>> strong_existential Mirror.WeakUnownedSwiftClass
stdout>>> weak_class Optional(Mirror.WeakUnownedSwiftClass)
stdout>>> weak_existential Optional(Mirror.WeakUnownedSwiftClass)
stdout>>> unowned_safe_class Mirror.WeakUnownedSwiftClass
stdout>>> unowned_safe_existential Mirror.WeakUnownedSwiftClass
stdout>>> unowned_unsafe_class Mirror.WeakUnownedSwiftClass
stdout>>> unowned_unsafe_existential Mirror.WeakUnownedSwiftClass
[       OK ] Mirrors.Weak and Unowned Swift refs in struct
[ RUN      ] Mirrors.Class/Root/NoSuperclassMirror
[       OK ] Mirrors.Class/Root/NoSuperclassMirror
[ RUN      ] Mirrors.class/UncustomizedSuper/NoSuperclassMirror
[       OK ] Mirrors.class/UncustomizedSuper/NoSuperclassMirror
[ RUN      ] Mirrors.class/CustomizedSuper/NoSuperclassMirror
[       OK ] Mirrors.class/CustomizedSuper/NoSuperclassMirror
[ RUN      ] Mirrors.class/CustomizedSuper/SuperclassCustomMirror/Direct
[       OK ] Mirrors.class/CustomizedSuper/SuperclassCustomMirror/Direct
[ RUN      ] Mirrors.class/CustomizedSuper/SuperclassCustomMirror/Indirect
[       OK ] Mirrors.class/CustomizedSuper/SuperclassCustomMirror/Indirect
[ RUN      ] Mirrors.class/CustomizedSuper/SuperclassCustomMirror/Indirect2
[       OK ] Mirrors.class/CustomizedSuper/SuperclassCustomMirror/Indirect2
[ RUN      ] Mirrors.class/Cluster
[       OK ] Mirrors.class/Cluster
[ RUN      ] Mirrors.Addressing
[       OK ] Mirrors.Addressing
[ RUN      ] Mirrors.Invalid Path Type
stderr>>> Fatal error: Someone added a conformance to MirrorPath; that privilege is reserved to the standard library
stderr>>> OK: saw expected "crashed: sigill"
[       OK ] Mirrors.Invalid Path Type
[ RUN      ] Mirrors.PlaygroundQuickLook
[       OK ] Mirrors.PlaygroundQuickLook
[ RUN      ] Mirrors._DefaultCustomPlaygroundQuickLookable
[       OK ] Mirrors._DefaultCustomPlaygroundQuickLookable
[ RUN      ] Mirrors.String.init
[       OK ] Mirrors.String.init
[ RUN      ] Mirrors.Struct/NonGeneric/DefaultMirror
[       OK ] Mirrors.Struct/NonGeneric/DefaultMirror
[ RUN      ] Mirrors.Struct/Generic/DefaultMirror
[       OK ] Mirrors.Struct/Generic/DefaultMirror
[ RUN      ] Mirrors.Enum/NoPayload/DefaultMirror
[       OK ] Mirrors.Enum/NoPayload/DefaultMirror
[ RUN      ] Mirrors.Enum/SingletonNonGeneric/DefaultMirror
[       OK ] Mirrors.Enum/SingletonNonGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/SingletonGeneric/DefaultMirror
[       OK ] Mirrors.Enum/SingletonGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/SinglePayloadNonGeneric/DefaultMirror
[       OK ] Mirrors.Enum/SinglePayloadNonGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/SinglePayloadGeneric/DefaultMirror
[       OK ] Mirrors.Enum/SinglePayloadGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/MultiPayloadTagBitsNonGeneric/DefaultMirror
[       OK ] Mirrors.Enum/MultiPayloadTagBitsNonGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/MultiPayloadSpareBitsNonGeneric/DefaultMirror
[       OK ] Mirrors.Enum/MultiPayloadSpareBitsNonGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/MultiPayloadTagBitsSmallNonGeneric/DefaultMirror
[       OK ] Mirrors.Enum/MultiPayloadTagBitsSmallNonGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/MultiPayloadGeneric/DefaultMirror
[       OK ] Mirrors.Enum/MultiPayloadGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/IndirectGeneric/DefaultMirror
[       OK ] Mirrors.Enum/IndirectGeneric/DefaultMirror
[ RUN      ] Mirrors.Enum/CaseName/Error
[       OK ] Mirrors.Enum/CaseName/Error
[ RUN      ] Mirrors.CustomMirror
[       OK ] Mirrors.CustomMirror
[ RUN      ] Mirrors.CustomMirrorIsInherited
[       OK ] Mirrors.CustomMirrorIsInherited
[ RUN      ] Mirrors.MetatypeMirror
[       OK ] Mirrors.MetatypeMirror
[ RUN      ] Mirrors.TupleMirror
[       OK ] Mirrors.TupleMirror
[ RUN      ] Mirrors.String/Mirror
[       OK ] Mirrors.String/Mirror
[ RUN      ] Mirrors.String.UTF8View/Mirror
[       OK ] Mirrors.String.UTF8View/Mirror
[ RUN      ] Mirrors.String.UTF16View/Mirror
[       OK ] Mirrors.String.UTF16View/Mirror
[ RUN      ] Mirrors.String.UnicodeScalarView/Mirror
[       OK ] Mirrors.String.UnicodeScalarView/Mirror
[ RUN      ] Mirrors.Character/Mirror
[       OK ] Mirrors.Character/Mirror
[ RUN      ] Mirrors.UnicodeScalar
[       OK ] Mirrors.UnicodeScalar
[ RUN      ] Mirrors.Bool
[       OK ] Mirrors.Bool
[ RUN      ] Mirrors.Float
[       OK ] Mirrors.Float
[ RUN      ] Mirrors.Double
[       OK ] Mirrors.Double
[ RUN      ] Mirrors.StaticString/Mirror
[       OK ] Mirrors.StaticString/Mirror
[ RUN      ] Mirrors.DictionaryIterator/Mirror
[       OK ] Mirrors.DictionaryIterator/Mirror
[ RUN      ] Mirrors.SetIterator/Mirror
[       OK ] Mirrors.SetIterator/Mirror
[ RUN      ] Mirrors.FieldNamesBug
[       OK ] Mirrors.FieldNamesBug
[ RUN      ] Mirrors.MirrorMirror
[       OK ] Mirrors.MirrorMirror
[ RUN      ] Mirrors.OpaquePointer/null
[       OK ] Mirrors.OpaquePointer/null
[ RUN      ] Mirrors.GenericNestedTypeField
[       OK ] Mirrors.GenericNestedTypeField
[ RUN      ] Mirrors.SymbolicReferenceInsideType
[       OK ] Mirrors.SymbolicReferenceInsideType
[ RUN      ] Mirrors.GenericNestedWithSameTypeConstraints
[       OK ] Mirrors.GenericNestedWithSameTypeConstraints
[ RUN      ] Mirrors.CustomAlignment
[       OK ] Mirrors.CustomAlignment
Mirrors: Some tests failed, aborting
UXPASS: []
FAIL: ["Weak and Unowned Obj-C refs in class (SR-5289)", "Weak and Unowned Obj-C refs in struct"]
SKIP: []
To debug, run:
$ /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/Mirror --stdlib-unittest-in-process --stdlib-unittest-filter "Weak and Unowned Obj-C refs in class (SR-5289)"

--
Command Output (stderr):
--
/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.script: line 5: 82939 Abort trap: 6           /usr/bin/env DYLD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx' LD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx:' SIMCTL_CHILD_DYLD_LIBRARY_PATH='/usr/lib/swift:/Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/lib/swift/macosx' /Users/buildnode/jenkins/workspace/oss-swift_tools-RA_stdlib-RA-test-simulator-swift-in-the-os/buildbot-custom/swift-macosx-x86_64/test-macosx-x86_64/stdlib/Output/Mirror.swift.tmp/Mirror

--

********************

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants