Skip to content

Commit

Permalink
Remove temporary unit test workarounds for dladdr() bugs.
Browse files Browse the repository at this point in the history
These issues have been resolved in iOS 9 beta3 and temporary workarounds
are no longer required.

Issue: PLCR-577
  • Loading branch information
landonf committed Jul 9, 2015
1 parent 75c6db6 commit 6945293
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions Source/PLCrashAsyncMachOImageTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,7 @@ - (void) testReadSymbolName {
IMP localIMP = class_getMethodImplementation([self class], _cmd);
Dl_info dli;
STAssertTrue(dladdr((void *)localIMP, &dli) != 0, @"Failed to look up symbol");
// XXX-TODO-DLADDR
//STAssertNotNULL(dli.dli_sname, @"Symbol name was stripped!");
if (dli.dli_sname == NULL) {
dli.dli_sname = __PRETTY_FUNCTION__;
NSLog(@"WARNING: dladdr() returned a NULL symbol name; this appears to be an iOS 9 bug.");
}
STAssertNotNULL(dli.dli_sname, @"Symbol name was stripped!");

/* Now walk the Mach-O table ourselves */
plcrash_async_macho_symtab_reader_t reader;
Expand Down Expand Up @@ -406,11 +401,6 @@ - (void) testFindSymbol {
IMP localIMP = class_getMethodImplementation([self class], _cmd);
Dl_info dli;
STAssertTrue(dladdr((void *)localIMP, &dli) != 0, @"Failed to look up symbol");
// XXX-TODO-DLADDR
if (dli.dli_sname == NULL) {
dli.dli_sname = __PRETTY_FUNCTION__;
NSLog(@"WARNING: dladdr() returned a NULL symbol name; this appears to be an iOS 9 bug.");
}

/* Compare the results */
STAssertEqualCStrings(dli.dli_sname, ctx.name, @"Returned incorrect symbol name");
Expand All @@ -425,11 +415,6 @@ - (void) testFindSymbolByName {
IMP localIMP = class_getMethodImplementation([self class], _cmd);
Dl_info dli;
STAssertTrue(dladdr((void *)localIMP, &dli) != 0, @"Failed to look up symbol");
// XXX-TODO-DLADDR
if (dli.dli_sname == NULL) {
dli.dli_sname = __PRETTY_FUNCTION__;
NSLog(@"WARNING: dladdr() returned a NULL symbol name; this appears to be an iOS 9 bug.");
}

/* Perform our symbol lookup */
pl_vm_address_t pc;
Expand Down

0 comments on commit 6945293

Please sign in to comment.