Skip to content
New issue

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

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

Already on GitHub? # to your account

Pass alignment to holder::allocate #425

Closed
wants to merge 2 commits into from
Closed

Conversation

vslashg
Copy link
Contributor

@vslashg vslashg commented Nov 13, 2023

aca3c8 added an alignment argument to holder::allocate which defaults to 1. However, make_constructor.hpp uses this function to create storage for a pointer and was never changed to pass an alignment, so it uses the too-permissive default.

This causes unaligned pointers to be created on most architectures (although the x86 family tolerates it). This can be detected as a failure by running projects under Clang ubsan.

aca3c8 added an alignment argument to holder::allocate which defaults to 1.  However, make_constructor.hpp uses this function to create storage for a pointer and was never changed to pass an alignment.

This causes unaligned pointers to be created.  This can be detected as a failure by running projects under Clang ubsan.
Fix patch to use boost python details to build without C++11.
@stefanseefeld
Copy link
Member

This fix is incorporated via #392

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants