Enable app verifier on VSTS; Fix debug log handle use (#1291)
This commit is contained in:
parent
eebbb6a602
commit
3b3f128306
|
|
@ -14,7 +14,6 @@
|
||||||
#include "atlbase.h"
|
#include "atlbase.h"
|
||||||
#include "config_utility.h"
|
#include "config_utility.h"
|
||||||
|
|
||||||
inline HANDLE g_hStandardOutput = INVALID_HANDLE_VALUE;
|
|
||||||
inline HANDLE g_logFile = INVALID_HANDLE_VALUE;
|
inline HANDLE g_logFile = INVALID_HANDLE_VALUE;
|
||||||
inline HMODULE g_hModule;
|
inline HMODULE g_hModule;
|
||||||
inline SRWLOCK g_logFileLock;
|
inline SRWLOCK g_logFileLock;
|
||||||
|
|
@ -149,7 +148,6 @@ VOID
|
||||||
DebugInitialize(HMODULE hModule)
|
DebugInitialize(HMODULE hModule)
|
||||||
{
|
{
|
||||||
g_hModule = hModule;
|
g_hModule = hModule;
|
||||||
g_hStandardOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
|
||||||
|
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
InitializeSRWLock(&g_logFileLock);
|
InitializeSRWLock(&g_logFileLock);
|
||||||
|
|
@ -290,10 +288,10 @@ DebugPrint(
|
||||||
|
|
||||||
OutputDebugStringA( strOutput.QueryStr() );
|
OutputDebugStringA( strOutput.QueryStr() );
|
||||||
DWORD nBytesWritten = 0;
|
DWORD nBytesWritten = 0;
|
||||||
|
|
||||||
if (IsEnabled(ASPNETCORE_DEBUG_FLAG_CONSOLE))
|
if (IsEnabled(ASPNETCORE_DEBUG_FLAG_CONSOLE))
|
||||||
{
|
{
|
||||||
WriteFile(g_hStandardOutput, strOutput.QueryStr(), strOutput.QueryCB(), &nBytesWritten, nullptr);
|
auto outputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
|
WriteFile(outputHandle, strOutput.QueryStr(), strOutput.QueryCB(), &nBytesWritten, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_logFile != INVALID_HANDLE_VALUE)
|
if (g_logFile != INVALID_HANDLE_VALUE)
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
||||||
DeletePublishOutput(deploymentResult);
|
DeletePublishOutput(deploymentResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact(Skip = "https://github.com/aspnet/IISIntegration/issues/933")]
|
||||||
public async Task AppOfflineDroppedWhileSiteFailedToStartInRequestHandler_SiteStops_InProcess()
|
public async Task AppOfflineDroppedWhileSiteFailedToStartInRequestHandler_SiteStops_InProcess()
|
||||||
{
|
{
|
||||||
var deploymentResult = await DeployApp(HostingModel.InProcess);
|
var deploymentResult = await DeployApp(HostingModel.InProcess);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ param($Mode)
|
||||||
function Setup-appverif($application)
|
function Setup-appverif($application)
|
||||||
{
|
{
|
||||||
appverif.exe -enable Exceptions Handles Heaps Leak Locks Memory Threadpool TLS SRWLock -for $application
|
appverif.exe -enable Exceptions Handles Heaps Leak Locks Memory Threadpool TLS SRWLock -for $application
|
||||||
$onlyLog = 0x181;
|
$onlyLog = 0x1E1;
|
||||||
$codes = @(
|
$codes = @(
|
||||||
# Exceptions
|
# Exceptions
|
||||||
0x650,
|
0x650,
|
||||||
|
|
@ -62,8 +62,8 @@ if (!(Test-Path $cdb))
|
||||||
|
|
||||||
if ($Mode -eq "Setup")
|
if ($Mode -eq "Setup")
|
||||||
{
|
{
|
||||||
#Setup-appverif w3wp.exe
|
Setup-appverif w3wp.exe
|
||||||
#Setup-appverif iisexpress.exe
|
Setup-appverif iisexpress.exe
|
||||||
|
|
||||||
if (!(Test-Path $ldHive ))
|
if (!(Test-Path $ldHive ))
|
||||||
{
|
{
|
||||||
|
|
@ -81,14 +81,15 @@ if ($Mode -eq "Shutdown")
|
||||||
{
|
{
|
||||||
Remove-Item $ldHive -Recurse -Force
|
Remove-Item $ldHive -Recurse -Force
|
||||||
|
|
||||||
#Shutdown-appverif w3wp.exe
|
Shutdown-appverif w3wp.exe
|
||||||
#Shutdown-appverif iisexpress.exe
|
Shutdown-appverif iisexpress.exe
|
||||||
|
|
||||||
foreach ($dump in (Get-ChildItem -Path $DumpFolder -Filter "*.dmp"))
|
foreach ($dump in (Get-ChildItem -Path $DumpFolder -Filter "*.dmp"))
|
||||||
{
|
{
|
||||||
if (Test-Path $cdb)
|
if (Test-Path $cdb)
|
||||||
{
|
{
|
||||||
& $cdb -z $dump.FullName -y "https://msdl.microsoft.com/download/symbols" -c ".loadby sos coreclr;!sym noisy;.reload /f;.dumpcab -a $($dump.FullName).cab;q;"
|
& $cdb -z $dump.FullName -y "https://msdl.microsoft.com/download/symbols" -c ".loadby sos coreclr;!sym noisy;.reload /f;.dumpcab -a $($dump.FullName).cab;q;"
|
||||||
|
Remove-Item $dump.FullName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue