[metadata] Fix use after free of signatures of some dynamic methods (#9863)
commit60643fccb4b076fc99660f33b2753f0e7f0b2119
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 6 Aug 2018 20:18:53 +0000 (6 23:18 +0300)
committerBernhard Urban <bernhard.urban@xamarin.com>
Mon, 6 Aug 2018 20:18:53 +0000 (6 22:18 +0200)
tree5cca5c2cc4640699db0cbdc16b142842f0839d54
parenta8a7c146e43ee27875faeab21030546a205b26f7
[metadata] Fix use after free of signatures of some dynamic methods (#9863)

* [metadata] Cache method signature in correct image hash

When freeing dynamic methods in mono_free_method, we remove entries in the method image's hashtables, hashed by the soon to be freed method signature.

* [metadata] Avoid unnecessary alloc
mono/metadata/marshal.c