Registry key for Global Flags (gflags)

Stephane Rolland picture Stephane Rolland · Aug 27, 2014 · Viewed 8.4k times · Source

I'm currently having an error while trying to remove the flag "Enable heap tagging by DLL" with the debug tool GFlags for so-called "image": the application I was debugging.

I get an "Unable to save the registry error 5". However there are no problem for other "Enable heap..." flags, they can be toggled on and off. I tried to launch the utility as Administrator but that doesn't change anything.

So I am trying to figure out what registry settings should I manually change to put things back to normal, however I do not seem to find the correct registry key about Windows Global Flags.

Or I could simply remove any global flag related to my application.

Any idea ?

I tried to find FLG_HEAP_PAGE_ALLOCS in the registry, which is the symbolic name of the more general flag "Enable page heap" as said here in MSDN. But without success.

Answer

Stephane Rolland picture Stephane Rolland · Aug 27, 2014

Delete the keys :

  • [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications\MyApplication.exe]
  • [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MyApplication.exe]

Beware that it will also remove debugging configurations made with/for Application Verifier.

Secondly, maybe it's related, but on MSDN regarding gflags:

"Note: Incorrect use of this tool can degrade system performance or prevent Windows from starting, requiring you to reinstall Windows.

Important: Pool tagging is permanently enabled on Windows Server 2003 and later versions of Windows, including Windows Vista. On these systems, the Enable pool tagging check box on the Global Flags dialog box is dimmed and commands to enable or disable pool tagging fail."