[Lldb-commits] [PATCH] D108088: [lldb] Avoid unhandled Error in TypeSystemMap::GetTypeSystemForLanguage
Dimitry Andric via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Aug 15 09:01:56 PDT 2021
dim created this revision.
dim added reviewers: aprantl, emaste, JDevlieghere, teemperor.
Herald added subscribers: krytarowski, arichardson.
dim requested review of this revision.
Herald added a project: LLDB.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108088
Files:
lldb/source/Symbol/TypeSystem.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108088.366500.patch
Type: text/x-patch
Size: 4476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210815/918166df/attachment.bin>
More information about the lldb-commits
mailing list