Skip to content

Commit

Permalink
Fix issues in other queries caused by changing fail_driver1.c (#97)
Browse files Browse the repository at this point in the history
* WIP. TODO fix duplicate results

* fix global tracking

* fix query to find instances where created variable not freed

* minor updates

* update other files for query

* updates for pull request changes. also needed to move the invlude of driver_snippet.c to be the first include in fail_driver1.c so that ntifs.h could be included in driver_snippet.c without errors

* update build_create_analyze_test.cmd to use msbuild configuration to allow different project configurations for different tests. Revert fail_driver1.c to fix build issues caused by previous change

* remove previously added VS project configuration. Use preprocessor definition project property instead.

---------

Co-authored-by: NateD-MSFT <[email protected]>
  • Loading branch information
jacob-ronstadt and NateD-MSFT authored Dec 8, 2023
1 parent 77fee14 commit 12bf2c9
Show file tree
Hide file tree
Showing 8 changed files with 267 additions and 255 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
//
// driver_snippet.c
//
#include "ntifs.h"

#include "ntifs.h"
#define SET_DISPATCH 1
// Template. Not called in this test.
void top_level_call() {}

PUNICODE_STRING unicodeStringGlobal;
void free_unicode_string(PUNICODE_STRING unicodeStr)
{
Expand Down
59 changes: 31 additions & 28 deletions src/drivers/test/WDMTestTemplate/WDMTestTemplate.sln
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0
MinimumVisualStudioVersion = 12.0
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fail_driver1", "driver\fail_driver1.vcxproj", "{7F88D5C5-F05F-4817-89F5-C811053277A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Debug|Win32.ActiveCfg = Debug|Win32
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Debug|Win32.Build.0 = Debug|Win32
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Release|Win32.ActiveCfg = Release|Win32
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Release|Win32.Build.0 = Release|Win32
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Debug|x64.ActiveCfg = Debug|x64
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Debug|x64.Build.0 = Debug|x64
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Release|x64.ActiveCfg = Release|x64
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34302.85
MinimumVisualStudioVersion = 12.0
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fail_driver1", "driver\fail_driver1.vcxproj", "{7F88D5C5-F05F-4817-89F5-C811053277A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Debug|Win32.ActiveCfg = Debug|Win32
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Debug|Win32.Build.0 = Debug|Win32
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Debug|x64.ActiveCfg = Debug|x64
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Debug|x64.Build.0 = Debug|x64
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Release|Win32.ActiveCfg = Release|Win32
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Release|Win32.Build.0 = Release|Win32
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Release|x64.ActiveCfg = Release|x64
{7F88D5C5-F05F-4817-89F5-C811053277A0}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B5DD9EDC-06C8-4BC7-BEC8-179828286FF8}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion src/drivers/test/WDMTestTemplate/driver/fail_driver1.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Module Name:
--*/

#include "driver_snippet.c"
#include "fail_driver1.h"
#include "driver_snippet.c"


#define _DRIVER_NAME_ "fail_driver1"
Expand Down
6 changes: 6 additions & 0 deletions src/drivers/test/WDMTestTemplate/driver/fail_driver1.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ Module Name:
#ifdef __cplusplus
extern "C" {
#endif

#if USE_NTIFS
#include "ntifs.h"
#else
#include <wdm.h>
#endif

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit 12bf2c9

Please sign in to comment.