[Lldb-commits] [PATCH] D68547: exception handling in PythonDataObjects.

Lawrence D'Anna via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Oct 5 17:24:52 PDT 2019

lawrence_danna created this revision.
lawrence_danna added reviewers: JDevlieghere, jasonmolenda, labath, zturner.
Herald added a project: LLDB.

Python APIs nearly all can return an exception.   They do this
by returning NULL, or -1, or some such value and setting
the exception state with PyErr_Set*().   Exceptions must be
handled before further python API functions are called.   Failure
to do so will result in asserts on debug builds of python.
It will also sometimes, but not usually result in crashes of
release builds.

Nearly everything in PythonDataObjects.h needs to be updated
to account for this.   This patch doesn't fix everything, 
but it does introduce some new methods using Expected<> 
return types that are safe to use.

split off from https://reviews.llvm.org/D68188

  rG LLVM Github Monorepo



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68547.223396.patch
Type: text/x-patch
Size: 17283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191006/bfc09cb0/attachment.bin>

More information about the lldb-commits mailing list