[release/6.0] Adding null check to avoid abort when invalid IL is encountered (#57731)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thu, 19 Aug 2021 17:02:58 +0000 (19:02 +0200)
committerGitHub <noreply@github.com>
Thu, 19 Aug 2021 17:02:58 +0000 (19:02 +0200)
commita06a1f436b3d1218160d5a71e517aa739ff01bc5
tree137a1f122382ffb5f5aaeabb6650f23bdfd71820
parentb614529f28772bd0f1f1834f4ccf154e1a57e8a5
[release/6.0] Adding null check to avoid abort when invalid IL is encountered (#57731)

When a callvirt instruction is encountered on a static method, there is
a hard abort/crash. This commit avoids the problem.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bill Holmes <bill.holmes@unity3d.com>
src/mono/mono/mini/method-to-ir.c