Replace the unprotected union+bool lazy resolution in DirectCallEdge with `std::call_once`/`std::once_flag`. Multiple threads can call `GetCallee` on the same edge concurrently and the old code had no synchronization on the union discriminator or its contents. This could lead to a corrupted pointer that would explain the crash we're observing sporadically. rdar://175006028
24 KiB
24 KiB