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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 4 14:05:58 PDT 2017


Should this be report_fatal_error?

On Mon, Sep 4, 2017 at 1:56 PM Davide Italiano via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:

> 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
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170904/dc534346/attachment.html>


More information about the llvm-commits mailing list