Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SunOS: Fix .memory_maps(grouped=False) #1093

Merged
merged 1 commit into from
May 20, 2017

Conversation

alxchk
Copy link
Contributor

@alxchk alxchk commented May 20, 2017

Addresses were truncated at least on LP64

@giampaolo
Copy link
Owner

What's the issue here? Wrong numbers were returned?

@alxchk
Copy link
Contributor Author

alxchk commented May 20, 2017

Yes.

Before:

python -c 'import psutil; print psutil.Process().memory_maps(grouped=False)[-1]'
pmmap_ext(addr='x17a0000-x179c000', perms='r-x-', path='/pupy/client/sources-linux/buildenv-sunos/build/lib/python2.7/lib-dynload/time.so', rss=16384, anonymous=0, locked=0)

@giampaolo
Copy link
Owner

OK, please update HISTORY and CREDITS and it's good to go.

@alxchk
Copy link
Contributor Author

alxchk commented May 20, 2017

So I need to issue new bug to write something to HISTORY? How this works?

@giampaolo
Copy link
Owner

Just take a look at HISTORY.rst and see how it's done. Just reference this PR number and describe what changed after your patch, e.g.:

- 1093_: [SunOS] Process.memory_maps() was returning incorrect numbers due to inappropriate conversion of C types. (patch by YOURNAME)

In CREDITS just add your name, website, etc. by following the existing convention.

@alxchk alxchk force-pushed the fix_memory_mappings branch from 403cd65 to f4ece4e Compare May 20, 2017 19:34
@alxchk
Copy link
Contributor Author

alxchk commented May 20, 2017

Done

@@ -27,6 +27,7 @@

**Bug fixes**

- 1093_: [SunOS] memory_maps() shows wrong 64 bit addresses
Copy link
Owner

@giampaolo giampaolo May 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there also a mismatch with the other numbers? You changed the type for all of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see the mismatch with other numbers (because usually they are quite low, and there is no chances to get signed integer overflow), but semantic should be the same - these numbers can not be negative.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks.

@giampaolo giampaolo merged commit a92cfcd into giampaolo:master May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants