[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-27 Thread Jorge Gorbe Moya via Phabricator via lldb-commits
jgorbe added a comment. In D146590#4225500 , @bulbazord wrote: > Yea, after reading the SWIG documentation, this diagnosis looks correct. If > you'd like to fix this feel free to upload a patch and list myself and @mib > as reviewers. Otherwise let me

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-27 Thread Alex Langford via Phabricator via lldb-commits
bulbazord added a comment. In D146590#4220388 , @jgorbe wrote: > I found the actual reason for the crash I was talking about. This patch only > addressed the incorrect `OverflowError`, but the crash comes from a double > free (as @rupprecht mentioned)

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-27 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D146590#4220388 , @jgorbe wrote: > I believe (but I don't have any experience with SWIG typemaps so this is an > educated guess) that the call to `free` in the error path comes from the > `%typemap(freearg)` immediately after

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-24 Thread Jorge Gorbe Moya via Phabricator via lldb-commits
jgorbe added a comment. I found the actual reason for the crash I was talking about. This patch only addressed the incorrect `OverflowError`, but the crash comes from a double free (as @rupprecht mentioned) in the error handling logic. The error path here

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-22 Thread Jorge Gorbe Moya via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG984354fbbe4e: [lldb] Update some uses of Python2 API in typemaps. (authored by jgorbe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-22 Thread Jorge Gorbe Moya via Phabricator via lldb-commits
jgorbe updated this revision to Diff 507442. jgorbe added a comment. Modified one of the existing test cases for `SBData.SetDataFromUInt64Array` to add a 2**63 to actually exercise the uint64 range. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146590/new/

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-21 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. Yep, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146590/new/ https://reviews.llvm.org/D146590

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-21 Thread Jordan Rupprecht via Phabricator via lldb-commits
rupprecht added a comment. In D146590#4211763 , @bulbazord wrote: >> `lldb -o "script data=lldb.SBData(); data.SetDataFromUInt64Array([2**63])"` > > Just tried this, didn't crash LLDB but it does give me the OverflowError you > mentioned. Here's what

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-21 Thread Alex Langford via Phabricator via lldb-commits
bulbazord added a comment. > `lldb -o "script data=lldb.SBData(); data.SetDataFromUInt64Array([2**63])"` Just tried this, didn't crash LLDB but it does give me the OverflowError you mentioned. Either way, this is probably okay? What do you think @mib? Repository: rG LLVM Github Monorepo

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-21 Thread Jordan Rupprecht via Phabricator via lldb-commits
rupprecht added reviewers: bulbazord, mib. rupprecht added a comment. Can you add a regression test that invokes `lldb -o "script data=lldb.SBData(); data.SetDataFromUInt64Array([2**63])"`? Just a simple shell test should suffice. LGTM, but it'd be nice if someone else can look too. Adding some

[Lldb-commits] [PATCH] D146590: [lldb] Update some uses of Python2 API in typemaps.

2023-03-21 Thread Jorge Gorbe Moya via Phabricator via lldb-commits
jgorbe created this revision. jgorbe added reviewers: labath, rupprecht. jgorbe added a project: LLDB. Herald added a subscriber: JDevlieghere. Herald added a project: All. jgorbe requested review of this revision. Python 3 doesn't have a distinction between PyInt and PyLong, it's all PyLong now.