This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients njs, pitrou, vstinner
Date 2016-03-21.15:55:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Patch version 5:

* add hashtable_compare_pointer_t() which compares pointer_t fields (ptr and domain) rather using _Py_hashtable_compare_direct() which causes issues with padding
* hashtable_hash_pointer_t() now uses memcpy() to get the pointer_t value rather than a pointer dereference

> What about compilers that don't support "__attribute__((packed))"?

packed is a small and *optional* optimization on the memory footprint of _tracemalloc structure (reduce tracemalloc.get_tracemalloc_memory()).

Using packed can introduce memory alignment issue, but since tracemalloc uses memcpy(), it *should* be fine in practice. Again, since I don't have access to SPARC CPU, I don't know how to test.

> Instead you could use a compare func that compares struct fields...

Date User Action Args
2016-03-21 15:55:09vstinnersetrecipients: + vstinner, pitrou, njs
2016-03-21 15:55:07vstinnersetmessageid: <>
2016-03-21 15:55:07vstinnerlinkissue26588 messages
2016-03-21 15:55:07vstinnercreate