[sgen] Throw OOM also from the managed allocator
authorVlad Brezae <brezaevlad@gmail.com>
Wed, 22 Feb 2017 23:29:27 +0000 (01:29 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Wed, 22 Feb 2017 23:33:09 +0000 (01:33 +0200)
commit0fc4608b1b0e9ad8eb03f581dce7c568bbd67393
tree34f2f4d5e577af92c9cde9e1db479ac4084d87f4
parent8d3e2a3c8228e50c3caf1cb28108421f9ffb50e3
[sgen] Throw OOM also from the managed allocator

Allocation functions from object.c correctly throw OOM when sgen allocation returns NULL. When allocating with the managed allocator we invoke sgen directly (as a fallback) and we didn't handle the NULL return case.

Fixes #52437
mono/metadata/sgen-mono.c