diff --git a/CREDITS b/CREDITS index 35f4b6b4a..6d7dd113f 100644 --- a/CREDITS +++ b/CREDITS @@ -840,3 +840,7 @@ N: Aleksey Lobanov C: Russia E: alex_github@likemath.ru W: https://github.com/AlekseyLobanov + +N: Will Hawes +W: https://github.com/wdh +I: 2496 diff --git a/HISTORY.rst b/HISTORY.rst index 39bb66157..5b32811e5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,11 @@ XXXX-XX-XX deprecated in psutil 4.0.0, released 8 years ago. Substitute is ``Process.memory_full_info()``. +**Bug fixes** + +- 2496_, [Linux]: Avoid segfault (a cPython bug) on ``Process.memory_maps()`` + for processes that use hundreds of GBs of memory. + **Compatibility notes** - 2480_: Python 2.7 is no longer supported. diff --git a/psutil/__init__.py b/psutil/__init__.py index cabfb1304..605138e22 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -1193,7 +1193,7 @@ def memory_maps(self, grouped=True): path = tupl[2] nums = tupl[3:] try: - d[path] = map(lambda x, y: x + y, d[path], nums) + d[path] = list(map(lambda x, y: x + y, d[path], nums)) except KeyError: d[path] = nums nt = _psplatform.pmmap_grouped