[all-commits] [llvm/llvm-project] 3071eb: [LLDB][PythonFile] fix dangerous borrow semantics ...

smoofra via All-commits all-commits at lists.llvm.org
Wed Oct 30 09:47:06 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3071ebf7b38341e89be04aa64c257c4643e0648c
      https://github.com/llvm/llvm-project/commit/3071ebf7b38341e89be04aa64c257c4643e0648c
  Author: Lawrence D'Anna <lawrence_danna at apple.com>
  Date:   2019-10-30 (Wed, 30 Oct 2019)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
    M lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp

  Log Message:
  -----------
  [LLDB][PythonFile] fix dangerous borrow semantics on python2

Summary:
It is inherently unsafe to allow a python program to manipulate borrowed
memory from a python object's destructor.     It would be nice to
flush a borrowed file when python is finished with it, but it's not safe
to do on python 2.

Python 3 does not suffer from this issue.

Reviewers: labath, mgorny

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D69532




More information about the All-commits mailing list