Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Exit gracefully when running ildasm -nat against unsupported ni file.#10821

Merged
jkotas merged 1 commit intodotnet:masterfrom
mazong1123:fix-10247
Apr 8, 2017
Merged

Exit gracefully when running ildasm -nat against unsupported ni file.#10821
jkotas merged 1 commit intodotnet:masterfrom
mazong1123:fix-10247

Conversation

@mazong1123
Copy link

ildasm -nat only works for fragile native images (ie CoreLib only by default).
Running ildasm -nat against unsupported native images would cause a segmentation fault. This PR checks whether pNativeHeader->Signature is CORCOMPILE_SIGNATURE. If not, exits with a meaningful error message.

fix #10247

ildasm -nat only works for fragile native images (ie CoreLib only by default).
Running ildasm -nat against unsupported native images would cause a segmentation fault. This PR checks pNativeHeader->Signature == CORCOMPILE_SIGNATURE and end the program with a meaningful error message.

fix #10247
@mazong1123
Copy link
Author

@jkotas Could you please take a look? Thanks :)

@jkotas jkotas merged commit 2024852 into dotnet:master Apr 8, 2017
@jkotas
Copy link
Member

jkotas commented Apr 8, 2017

Thanks!

@mazong1123 mazong1123 deleted the fix-10247 branch April 9, 2017 02:25
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…dotnet/coreclr#10821)

ildasm -nat only works for fragile native images (ie CoreLib only by default).
Running ildasm -nat against unsupported native images would cause a segmentation fault. This PR checks pNativeHeader->Signature == CORCOMPILE_SIGNATURE and end the program with a meaningful error message.

fix dotnet/coreclr#10247

Commit migrated from dotnet/coreclr@2024852
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ildasm fails to read ni file with a specific option (Segmentation fault)

4 participants