Fix MSIDLogger EXC_BAD_INSTRUCTION crash
antrix1989 opened this issue · 0 comments
antrix1989 commented
Because MSIDLogger is not thread safe, it crashes during the tests. Run the following UT to reproduce the issue:
-
(void)test_logger
{
while (true) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^ {
MSID_LOG_WARN(nil, @"BG thread");
});MSID_LOG_WARN(nil, @"Main thread");
}
}