SDV (Static Driver Verifier) failure

Hi Guys,
I am running SDV against my driver using vs2012, and I am getting some error messages that I don’t understand ( see below) .I was wondering if you know anything about this.
Why would slamcl fails with error-code 4?
Thanks
Pada


SDV is building for
Build ‘ntdrv’ …Done
The call to Slamcl returned with exit code:=4.
This happened while compiling compile.cmd.
The compile step failed for ‘ntdrv’ .
SDV exit code: 5
SDV encountered errors when scanning the driver. Please ensure roletypes are present and/or consult SDV documentation.
C:\Program Files (x86)\Windows Kits\8.0\build\WindowsDriver8.0.Sdv.targets(66,9): error MSB3075: The command “staticdv.exe /devenv /check” exited with code 5. Please verify that you have sufficient rights to run this command. [C:\branches\src\kernel\port\windows\ntdrv\my_driver.vcxproj]
Done Building Project “C:\branches\src\kernel\port\windows\ntdrv\mydriver.vcxproj” (sdv target(s)) – FAILED.
Build FAILED.
“C:\branches\src\kernel\port\windows\ntdrv\mydriver.vcxproj” (sdv target) (1) ->
(Sdv target) ->
C:\Program Files (x86)\Windows Kits\8.0\build\WindowsDriver8.0.Sdv.targets(66,9): error MSB3075: The command “staticdv.exe /devenv /check” exited with code 5. Please verify that you have sufficient rights to run this command. [C:\branches\src\kernel\port\windows\ntdrv\mydriver.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:01:27.31
C:\branches\src\kernel\port\windows\ntdrv>exit 0

xxxxx@hotmail.com wrote:

I am running SDV against my driver using vs2012, and I am getting some error messages that I don’t understand ( see below) .I was wondering if you know anything about this.
Why would slamcl fails with error-code 4?

You’ve encountered a bug in the tool. For now the best you can do is
try to tweak things until it doesn’t fail any more. Is this a very
large project? I noticed the compile time was a minute and a half.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Yes, This is a large project.
Tim, can you explain what you mean by “tweak things”? What needs to be tweaked?

The SDV rules you’re invoking. Or your code. Or both.

Here at OSR, we’ve seen (the Win8 WDK version of) SDK crash even on some pretty reasonable sized projects. Just fooling with it for a while and changing some code made it work.

*** IT EVEN FOUND A REAL BUG (a first for us for SDV, so we’re happy)!!

Peter
OSR

I reduced the rules to 1 but it still fails.

Hi Pada, to help you can you provide us with the following information?

  • which company do you work for and are you/your company currently under some type of partner program with Microsoft?
  • What versions of the WDK and VS you have? Are these VS 2012 RTM?
  • What platform/configuration are you building and running SDV for?
    o (it looks like you are running this for x64 with release configuration. Is your driver also an x64 driver?)
  • What’s the driver model and version? Is this a KMDF driver?
  • Anything special about this driver? Precompiled headers, linked libraries etc.?
  • Can you try the following in a VS Command Prompt:
    Navigate to driver folder
    Msbuild /t:sdv /p:inputs=?/clean? /p:platform= /p:configuration=
    Msbuild /t:sdv /p:inputs=?/scan? /p:platform= /p:configuration=
    - Can you please provide us the SDV folder in the driver folder? (depends on your existing relationship with Microsoft, this may impact how much/what kinds of support/help we can provide)

After tweaking SDV, things are working now.
Thanks for all your help.

Great to know. To help us improve the product, can you share what tweaks you made?

Thanks,
Toby

We ran the Code analyzer and fixed all the issues that it complained. After that SDV was much happier tool