[Lldb-commits] [PATCH] D59913: Get Version SWIG wrapper should fill the list it makes
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 27 18:22:15 PDT 2019
jingham created this revision.
jingham added a reviewer: labath.
Herald added subscribers: lldb-commits, jdoerfert.
Herald added a project: LLDB.
The "uint32_t *versions, uint32_t num_versions" wrapper makes a list with the number of elements that SBModule::GetVersion said it returns, but if one of those elements is UINT32_MAX it aborts filling the list. If you then iterate over that returned list in Python, you will get a crash. This patch will fill all the elements GetVersion said it had.
This comes up if you have a library with a version 0.0.0. That returns the (to me) not very sensical result of 2 elements, the first of which is UINT32_MAX.
This patch is just to handle the crash that that result causes in Python. I asked on lldb-dev why GetVersion does this - maybe there is some good reason I don't know. But anyway, I want to treat that as a separate issue.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D59913
Files:
packages/Python/lldbsuite/test/macosx/version_zero/Makefile
packages/Python/lldbsuite/test/macosx/version_zero/TestGetVersionZeroVersion.py
packages/Python/lldbsuite/test/macosx/version_zero/dylib.c
packages/Python/lldbsuite/test/macosx/version_zero/main.c
scripts/Python/python-typemaps.swig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59913.192550.patch
Type: text/x-patch
Size: 4212 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190328/7bec7e3c/attachment-0001.bin>
More information about the lldb-commits
mailing list