[Lldb-commits] [PATCH] D77480: Fix illegal early call to PyBuffer_Release in swig typemaps

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 7 03:12:54 PDT 2020


labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

I'm not exactly happy about the lack of a test case, but I guess we can let this slide on the account of it requiring implementing a non-standard PyBuffer in c++ and then loading that from a python test suite and passing it to lldb, which would require a completely new kind of a test case.



================
Comment at: lldb/bindings/python/python-typemaps.swig:495
+  Py_buffer buffer;
+  Py_buffer_RAII() { buffer = {}; };
+  Py_buffer &operator=(const Py_buffer_RAII &) = delete;
----------------
Move this into the initializer list, or maybe even into the default initializer (`Py_buffer buffer = {};`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77480/new/

https://reviews.llvm.org/D77480





More information about the lldb-commits mailing list