Skip to content

Handle the warnings in R2RDump #966

Closed
@cshung

Description

@cshung

In order to extract the parsing code from R2RDump to a separate library, I silenced a couple of warnings from the code in #267. This issue is filed to track the work to surface the warning in some TBD way.

if (!Enum.IsDefined(typeof(R2RSection.SectionType), type))
{
// TODO (refactoring) - what should we do?
// R2RDump.WriteWarning("Invalid ReadyToRun section type");
}

if ((UnwindCodeArray[i].FrameOffset & 0xF0000000) != 0)
{
// TODO (refactoring) - what should we do?
// R2RDump.WriteWarning("Illegal unwindInfo unscaled offset: too large");
}

In general, the R2RDump tool is not robust against malformed files, we do not expect any of those appears in the wild. Here is a similar issue for handling missing reference assembly.

https://github.com/dotnet/coreclr/issues/27564

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-R2RDump-coreclrReady-to-run image dump toolhelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions