[release/10.0] Defer DOTNET_DbgEnableMiniDump error message until dump creation by github-actions[bot] · Pull Request #126055 · dotnet/runtime (original) (raw)

AI and others added 8 commits

March 24, 2026 20:03

@steveisok

…Line

Move the error message from PalCreateDumpInitialize to BuildCreateDumpCommandLine. This prevents the error from appearing during initialization when createdump binary doesn't exist, and instead only shows it when a dump is actually being created. This allows DOTNET_DbgEnableMiniDump to be set even when crossgen is involved.

Co-authored-by: steveisok 471438+steveisok@users.noreply.github.com

@steveisok

Co-authored-by: steveisok 471438+steveisok@users.noreply.github.com

@steveisok

…mandLine

Keep the original logic where the path is not stored if the file doesn't exist. Only move the fprintf from PalCreateDumpInitialize to BuildCreateDumpCommandLine.

Co-authored-by: steveisok 471438+steveisok@users.noreply.github.com

@steveisok

Co-authored-by: steveisok 471438+steveisok@users.noreply.github.com

@noahfalk

Add a new global flag g_warnCreateDumpMissing to distinguish between:

Set the flag in PalCreateDumpInitialize when createdump is not found. Check the flag in both dump creation code paths:

This ensures the warning only appears when actually trying to create a dump, not during initialization.

Co-authored-by: noahfalk 6243776+noahfalk@users.noreply.github.com

@noahfalk

Extract the error message into g_createDumpMissingMessage constant to avoid duplication and make future updates easier.

Co-authored-by: noahfalk 6243776+noahfalk@users.noreply.github.com

@noahfalk

Remove g_warnCreateDumpMissing flag and stat() check during initialization. Instead, detect the missing createdump binary when execv() returns ENOENT error and print the error message at that point. This defers the check until dump creation time, avoiding unnecessary file system checks during initialization.

Co-authored-by: noahfalk 6243776+noahfalk@users.noreply.github.com

@hoyosjs hoyosjs linked an issue

Mar 24, 2026

that may beclosed by this pull request

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})