-
Notifications
You must be signed in to change notification settings - Fork 5.4k
test #127489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test #127489
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1861,51 +1861,97 @@ HRESULT ClrDataAccess::EnumMemWriteDataSegment() | |||||
|
|
||||||
| //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||||||
| // | ||||||
| // Custom dumps enumerate the minimal CLR state needed for | ||||||
| // MiniDumpWithFullAuxiliaryState: thread stacks, modules, CLR statics, and any | ||||||
| // memory reached implicitly from those roots. | ||||||
| // Custom Dump. Depending on the value of g_ECustomDumpFlavor, different dump | ||||||
|
||||||
| // Custom Dump. Depending on the value of g_ECustomDumpFlavor, different dump | |
| // Custom Dump. Depending on the value of g_ECustomDumpFlavor, different dumps |
Copilot
AI
Apr 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EnumMemoryRegionsWorkerCustom computes a "status" value (including setting E_INVALIDARG), but unconditionally returns S_OK. This will mask failures/cancellation from callers and can make dump generation report success even when enumeration failed. Return the computed status instead of always returning S_OK.
| return S_OK; | |
| return status; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2435,6 +2435,16 @@ DebuggerMethodInfo::EnumMemoryRegions(CLRDataEnumMemoryFlags flags) | |||||||||||||||||||
| DAC_ENUM_DTHIS(); | ||||||||||||||||||||
| SUPPORTS_DAC; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if (flags != CLRDATA_ENUM_MEM_MINI && flags != CLRDATA_ENUM_MEM_TRIAGE && flags != CLRDATA_ENUM_MEM_HEAP2) | ||||||||||||||||||||
| { | ||||||||||||||||||||
| // Modules are enumerated already for minidumps, save the empty calls. | ||||||||||||||||||||
| if (m_module.IsValid()) | ||||||||||||||||||||
| { | ||||||||||||||||||||
| m_module->EnumMemoryRegions(flags, true); | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
Comment on lines
+2438
to
+2447
|
||||||||||||||||||||
| if (flags != CLRDATA_ENUM_MEM_MINI && flags != CLRDATA_ENUM_MEM_TRIAGE && flags != CLRDATA_ENUM_MEM_HEAP2) | |
| { | |
| // Modules are enumerated already for minidumps, save the empty calls. | |
| if (m_module.IsValid()) | |
| { | |
| m_module->EnumMemoryRegions(flags, true); | |
| } | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1881,6 +1881,21 @@ Assembly::EnumMemoryRegions(CLRDataEnumMemoryFlags flags) | |||||||||
| { | ||||||||||
| GetLoaderAllocator()->EnumMemoryRegions(flags); | ||||||||||
| } | ||||||||||
| else | ||||||||||
| { | ||||||||||
| if (m_pClassLoader.IsValid()) | ||||||||||
| { | ||||||||||
| m_pClassLoader->EnumMemoryRegions(flags); | ||||||||||
| } | ||||||||||
| if (m_pModule.IsValid()) | ||||||||||
| { | ||||||||||
| m_pModule->EnumMemoryRegions(flags, true); | ||||||||||
| } | ||||||||||
|
Comment on lines
+1890
to
+1893
|
||||||||||
| if (m_pModule.IsValid()) | |
| { | |
| m_pModule->EnumMemoryRegions(flags, true); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6784,6 +6784,10 @@ Thread::EnumMemoryRegions(CLRDataEnumMemoryFlags flags) | |||||||||
| WRAPPER_NO_CONTRACT; | ||||||||||
|
|
||||||||||
| DAC_ENUM_DTHIS(); | ||||||||||
| if (flags != CLRDATA_ENUM_MEM_MINI && flags != CLRDATA_ENUM_MEM_TRIAGE && flags != CLRDATA_ENUM_MEM_HEAP2) | ||||||||||
| { | ||||||||||
| AppDomain::GetCurrentDomain()->EnumMemoryRegions(flags, true); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if (m_debuggerFilterContext.IsValid()) | ||||||||||
| { | ||||||||||
|
|
@@ -6871,6 +6875,11 @@ Thread::EnumMemoryRegionsWorker(CLRDataEnumMemoryFlags flags) | |||||||||
| DacGetThreadContext(this, &context); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if (flags != CLRDATA_ENUM_MEM_MINI && flags != CLRDATA_ENUM_MEM_TRIAGE && flags != CLRDATA_ENUM_MEM_HEAP2) | ||||||||||
| { | ||||||||||
| AppDomain::GetCurrentDomain()->EnumMemoryRegions(flags, true); | ||||||||||
| } | ||||||||||
|
|
||||||||||
|
Comment on lines
+6878
to
+6882
|
||||||||||
| if (flags != CLRDATA_ENUM_MEM_MINI && flags != CLRDATA_ENUM_MEM_TRIAGE && flags != CLRDATA_ENUM_MEM_HEAP2) | |
| { | |
| AppDomain::GetCurrentDomain()->EnumMemoryRegions(flags, true); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment typo: "the later uses" should be "the latter uses" (referring to MiniDumpWithPrivateReadWriteMemory vs MiniDumpNormal).