AzureAD/microsoft-authentication-library-common-for-objc

Fix MSIDLogger EXC_BAD_INSTRUCTION crash

antrix1989 opened this issue · 0 comments

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");
    

    }
    }