]> git.saurik.com Git - apple/objc4.git/blobdiff - test/taggedPointers.m
objc4-680.tar.gz
[apple/objc4.git] / test / taggedPointers.m
index a6d7be9946d5584dce3aca98bdf2a892e25394e9..ae4e994a40de6004db5a3d3926f9be5457697cee 100644 (file)
@@ -272,6 +272,11 @@ void testGenericTaggedPointer(objc_tag_index_t tag, Class cls)
 
 int main()
 {
+    if (objc_collecting_enabled()) {
+        // GC's block objects crash without this
+        dlopen("/System/Library/Frameworks/Foundation.framework/Foundation", RTLD_LAZY);
+    }
+
     testassert(objc_debug_taggedpointer_mask != 0);
     testassert(_objc_taggedPointersEnabled());