Search code examples
visual-c++driver

Static Driver Verifier with driver project: Unrecoverable error in InterceptedBuild stage


After I run the following command:

msbuild /p:Configuration=Win8_Release /p:Platform=x64 /t:sdv /p:inputs="/check /debug"

I got the following errors in smvbuild.log:

Task "Link"
    C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\smv\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\BexWinCj.sys" /VERSION:"10.0" /INCREMENTAL:NO /NOLOGO /WX /SECTION:"INIT,d" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\BufferOverflowFastFailK.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\ntoskrnl.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\hal.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\wmilib.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\BufferOverflowFastFailK.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\ntoskrnl.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\hal.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\wmilib.lib" /NODEFAULTLIB /MANIFEST:NO /DEBUG /PDB:"C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\BexWinCj.pdb" /SUBSYSTEM:NATIVE,"10.00" /Driver /OPT:REF /OPT:ICF /ENTRY:"GsDriverEntry" /RELEASE /IMPLIB:"C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\BexWinCj.lib" /MERGE:"_TEXT=.text;_PAGE=PAGE" /MACHINE:X64 /PROFILE /guard:cf /kernel /IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235 /osversion:10.0 /pdbcompress /debugtype:pdata C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjMessage.res
          C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjConfigMgr.obj
          C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjController.obj
          C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjJournalMgr.obj
          C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjMain.obj
          C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjUtility.obj
          C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjVolfilter.obj

          Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified
             at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
             at System.Diagnostics.Process.Start()
             at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
             at SmvInterceptorWrapper.Program.Main(String[] args)

I have checked the files in the link command, they all exist. Does anyone know how to deal with this SDV InterceptedBuild error?


Solution

  • I encountered this too. Following advice at http://answers.flyppdevportal.com/MVC/Post/Thread/fa1eac9a-7231-41c9-9bbf-9f929dbfe75c?category=wdk, upgraded to VS2019 v16.6, problem solved.