Open
Description
Reproduce
- Xcode 9.2, 9.3, 9.4 beta
- macOS Sierra, High Sierra
- Pull calabash-ios-server develop/ branch
- Update code sign settings for the XCTest target to match your signing environment
- Run an individual XCTest via the Xcode UI until the crash happens (takes 2 - 3 tries)
Expected
Tests to complete.
Found
Bad access in
SPTShareExampleGroups.m#L28
Analysis
if (numClasses > 0) {
classes = (Class *)malloc(sizeof(Class) * numClasses);
numClasses = objc_getClassList(classes, numClasses);
Class klass, superClass;
for(uint i = 0; i < numClasses; i++) {
klass = classes[i];
superClass = class_getSuperclass(klass);
if (superClass == SPTSharedExampleGroupsClass) {
[[[klass alloc] init] sharedExampleGroups];
}
}
}
}
free(classes);
}
I believe classes are being dealloc'd during the loop.
I am not sure what this code is trying to accomplish. Skipping the loop appears to have no effect on Specta.
Metadata
Metadata
Assignees
Labels
No labels