Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Registry key for Global Flags (gflags)

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.

like image 698
Stephane Rolland Avatar asked Aug 27 '14 17:08

Stephane Rolland


People also ask

Where can I get Gflags?

Where to get GFlags. GFlags is included in the Debugging Tools for Windows 10 (WinDbg).

How do I disable Gflags?

After using global flags for debugging, submit a gflags /p /disable command to turn off the page heap verification and delete associated registry entries. Otherwise, entries that the debugger reads remain in the registry.

What is a global flag?

The Global Flags (gflags.exe) utility provides a simple method of setting certain keys within the system registry, adjusting the kernel settings of the running system, and altering the settings for image files. You can set these keys by using a graphical or command-line interface.


1 Answers

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."

like image 73
Stephane Rolland Avatar answered Sep 20 '22 13:09

Stephane Rolland