a949c6a0d6
Merge commit 5033f0793fe6 from llvm git (by Dimitry Andric):
[lldb] Avoid unhandled Error in TypeSystemMap::GetTypeSystemForLanguage
When assertions are turned off, the `llvm::Error` value created at the
start of this function is overwritten using the move-assignment
operator, but the success value is never checked. Whenever a TypeSystem
cannot be found or created, this can lead to lldb core dumping with:
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior to being destroyed).
Fix this by not creating a `llvm::Error` value in advance, and directly
returning the result of `llvm::make_error` instead, whenever an error is
encountered.
See also: <https://bugs.freebsd.org/253881> and
<https://bugs.freebsd.org/257829>.
Reviewed By: teemperor
Differential Revision: https://reviews.llvm.org/D108088
Reported by: dmgk, ota@j.email.ne.jp
PR: 253881, 257829
(cherry picked from commit
|
||
---|---|---|
.. | ||
apr | ||
apr-util | ||
atf | ||
bc | ||
bearssl | ||
blacklist | ||
bmake | ||
bsnmp | ||
byacc | ||
bzip2 | ||
capsicum-test | ||
com_err | ||
cortex-strings | ||
dialog | ||
diff | ||
dma | ||
ee | ||
elftoolchain | ||
expat | ||
file | ||
flex | ||
gdtoa | ||
googletest | ||
hyperv/tools | ||
ipfilter | ||
jemalloc | ||
kyua | ||
ldns | ||
ldns-host | ||
less | ||
lib9p | ||
libarchive | ||
libbegemot | ||
libc-pwcache | ||
libc-vis | ||
libcxxrt | ||
libdivsufsort | ||
libedit | ||
libevent | ||
libexecinfo | ||
libpcap | ||
libucl | ||
libxo | ||
llvm-project | ||
lua | ||
lutok | ||
mandoc | ||
mknod | ||
mtree | ||
ncurses | ||
netbsd-tests | ||
netcat | ||
ngatm | ||
ntp | ||
nvi | ||
ofed | ||
one-true-awk | ||
openbsm | ||
opencsd/decoder | ||
openpam | ||
openresolv | ||
opie | ||
pam_modules/pam_passwdqc | ||
pf | ||
pjdfstest | ||
pnglite | ||
pnpinfo | ||
processor-trace | ||
sendmail | ||
serf | ||
smbfs | ||
sqlite3 | ||
subversion | ||
tcp_wrappers | ||
tcpdump | ||
tcsh | ||
telnet | ||
terminus | ||
tnftp | ||
traceroute | ||
tzcode | ||
tzdata | ||
unbound | ||
unvis | ||
vis | ||
wpa | ||
xz |