Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Assertion `(char *) aligned_storage + holder_size <= (char *)base_storage + base_allocation' failed.

Open
#384 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, python

Research direction

Start in libs/python/src/object/class.cpp around the allocation logic near line 750 and inspect how the -1 adjustment interacts with ARM alignment and storage sizes. Reproduce the assertion on an ARM platform and compare it with the x64 behavior. Done means establishing whether the allocation calculation is incorrect and documenting or correcting it with validation for both platforms.

Written by the indexing model from the issue text.

Description

Hi,

Many thanks for the great library!

We just migrated to boost 1.78 and start getting:

python3: libs/python/src/object/class.cpp:762: static void* boost::python::instance_holder::allocate(PyObject*, std::size_t, std::size_t, std::size_t): Assertion `(char *) aligned_storage + holder_size <= (char *)base_storage + base_allocation' failed.

on arm platform. On x64 everything works perfect.

I took a look into boost::python::instance_holder::allocate with debugger and see:

sizeof(alignment_marker_t) == 4
alignment == 4
holder_size == 16

so assertion is correct.

I'm a bit confused, why we need -1 at https://github.com/boostorg/python/blame/develop/src/object/class.cpp#L750?

Looking forward for your answer!

Dominant language
C++
Stars
537
Forks
223
Avg merge
11h 22m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/python

All issues in boostorg/python

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.