Current master branch crashes MSVC compiler

Visual Studio Version: 2015 (Enterprise)
Expected Behaviour: Successful build.
Actual Behaviour: Crashes compiler, output below:

5>d:\projects\cpp\unrealengine\engine\source\runtime\core\public\Containers/Set.h(55): fatal error C1001: An internal error has occurred in the compiler.
5>  (compiler file 'msc1.cpp', line 1421)
5>   To work around this problem, try simplifying or changing the program near the locations listed above.
5>  Please choose the Technical Support command on the Visual C++
5>   Help menu, or open the Technical Support help file for more information
5>  d:\projects\cpp\unrealengine\engine\source\runtime\core\public\Containers/Set.h(54): note: while compiling class template member function 'uint32 DefaultKeyFuncs<InElementType,false>::GetKeyHash(FPrimitiveSceneInfo *)'
5>          with
5>          [
5>              InElementType=FPrimitiveSceneInfo *
5>          ]
5>  d:\projects\cpp\unrealengine\engine\source\runtime\core\public\Containers/Set.h(645): note: see reference to function template instantiation 'uint32 DefaultKeyFuncs<InElementType,false>::GetKeyHash(FPrimitiveSceneInfo *)' being compiled
5>          with
5>          [
5>              InElementType=FPrimitiveSceneInfo *
5>          ]
5>  d:\projects\cpp\unrealengine\engine\source\runtime\core\public\Containers/Set.h(199): note: see reference to class template instantiation 'DefaultKeyFuncs<InElementType,false>' being compiled
5>          with
5>          [
5>              InElementType=FPrimitiveSceneInfo *
5>          ]
5>  d:\projects\cpp\unrealengine\engine\source\runtime\renderer\private\ScenePrivate.h(1206): note: see reference to class template instantiation 'TSet<FPrimitiveSceneInfo *,DefaultKeyFuncs<InElementType,false>,FDefaultSetAllocator>' being compiled
5>          with
5>          [
5>              InElementType=FPrimitiveSceneInfo *
5>          ]

Anyone have any idea how to fix this? Reinstalling Visual Studio did not help, so I’m kinda stuck with the makeshift solution of cancelling the build and starting it again.

Update: I was mistaken, it happens in more than just one place.

2>D:\Projects\Cpp\UnrealEngine\Engine\Source\Editor\DetailCustomizations\Private\FbxImportUIDetails.cpp(195): fatal error C1001: An internal error has occurred in the compiler.
2>  (compiler file 'msc1.cpp', line 1421)
2>   To work around this problem, try simplifying or changing the program near the locations listed above.
2>  Please choose the Technical Support command on the Visual C++
2>   Help menu, or open the Technical Support help file for more information
2>  INTERNAL COMPILER ERROR in 'D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe'
2>      Please choose the Technical Support command on the Visual C++
2>      Help menu, or open the Technical Support help file for more information

Well, now it works again? What the hell. This better not be some sort of timing based issue with the msvc compiler, that’d be hell of a lot more annoying than a normal bug.

Reopened this Issue as it keeps happening in the same location. Cancelling the build and then restarting it “solves” it but that can’t be working in the long run.

There probably nothing that can be does here in UE4 side. First of all Epic (and practically any developer that runs public repository) does not guaranty that master branch will build, 2nd this is internal compiler error, so something happening with compiler, because compiler should process files without any crash, if something is wrong it should give you error not crash, there is possibility this might be file corruption or something.

I actually figured this one out shortly after re-opening. It seems that git set some file owners incorrectly and running visual studio as administrator allows it to build.