[PATCH] D37447: [Decompression] Fail gracefully when out of memory

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 4 13:56:47 PDT 2017


davide added a comment.

I don't think we want to do something fancier, at least for now.
If you run out of memory, we just report instead of crashing.
Presumably, if something shows up, we can have an API that propagates back errors to the caller which can take an appropriate action, but I don't see a compelling use case (maybe I miss one?)



================
Comment at: lib/Object/Decompressor.cpp:98-100
+  errs() << "Decompression failed: unable to allocate "
+         << *static_cast<uint64_t *>(SizePtr) << " bytes.\n";
+  exit(1);
----------------
fatal?


Repository:
  rL LLVM

https://reviews.llvm.org/D37447





More information about the llvm-commits mailing list