[demangler] call terminate() if allocation failed
authorErik Pilkington <erik.pilkington@gmail.com>
Mon, 23 Jul 2018 22:23:04 +0000 (22:23 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Mon, 23 Jul 2018 22:23:04 +0000 (22:23 +0000)
commit28e08a0a617c128259015614e8f90c98d2487ba6
tree2ddee91cf7a77f1c79125ee99f9aaf5f0c78b1a7
parent247aac81abee8d7b4b9635347d0ab9a287e5b441
[demangler] call terminate() if allocation failed

We really should set *status to memory_alloc_failure, but we need to refactor
the demangler a bit to properly propagate the failure up the stack. Until then,
its better to explicitly terminate then rely on a null dereference crash.

rdar://31240372

llvm-svn: 337759
libcxxabi/src/cxa_demangle.cpp
libcxxabi/src/demangle/Utility.h
llvm/lib/Demangle/ItaniumDemangle.cpp
llvm/lib/Demangle/Utility.h