[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-30 Thread Lawrence D'Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3071ebf7b383: [LLDB][PythonFile] fix dangerous borrow semantics on python2 (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-30 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. In D69532#1725772 , @lawrence_danna wrote: > > It shouldn't be really needed -- if everything goes through the same FILE* > > object, the C library

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna added a comment. @labath looks like you were right, just not flushing seems to work fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69532/new/ https://reviews.llvm.org/D69532 ___

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 227009. lawrence_danna added a comment. fix the test too Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69532/new/ https://reviews.llvm.org/D69532 Files:

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 227007. lawrence_danna added a comment. just don't even flush Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69532/new/ https://reviews.llvm.org/D69532 Files:

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D69532#1724806 , @labath wrote: > So, if I understand correctly. The problem here is the final call to > `fflush`, which can end up referencing a closed FILE*. Can we just not call > `fflush` then? Hrm, maybe. I'll

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. So, if I understand correctly. The problem here is the final call to `fflush`, which can end up referencing a closed FILE*. Can we just not call `fflush` then? It shouldn't be really needed -- if everything goes through the same FILE* object, the C library will make

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-28 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: labath, mgorny. Herald added a project: LLDB. It is, I think, inherently unsafe to hand a borrowed native file object to a python program on python 2. This is because the python file object must be created with a FILE*, not