]> granicus.if.org Git - llvm/commit
[Decompression] Fail gracefully when out of memory
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 5 Sep 2017 11:21:38 +0000 (11:21 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 5 Sep 2017 11:21:38 +0000 (11:21 +0000)
commit95c992eb85fab293afb24b0bb59685f3cb5f8dbd
treec4ccbb5b6fc0ee7e05bd4e4ffb8b627f78cdeef5
parent853df6350533910c4ee19dd7bf673729a1b2408e
[Decompression] Fail gracefully when out of memory

This patch adds failing gracefully when running out of memory when
allocating a buffer for decompression.

This provides a work-around for:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3224

Differential revision: https://reviews.llvm.org/D37447

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312526 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/Decompressor.h
lib/Object/Decompressor.cpp
test/DebugInfo/Inputs/dwarfdump-decompression-invalid-size.elf-x86-64 [new file with mode: 0644]
test/DebugInfo/dwarfdump-decompression-invalid-size.test [new file with mode: 0644]