Merge "Guard against failed array allocation" into nyc-dev
am: 834fde8

* commit '834fde83f9a924f23e920306d9f7590fb6fd0e0b':
  Guard against failed array allocation