Assertion `(char *) aligned_storage + holder_size <= (char *)base_storage + base_allocation' failed.
- Linguagem predominante
- C++
- Estrelas
- 537
- Forks
- 223
- Merge médio
- 11h 22min
- PRs com merge (30d)
- 2
Descrição
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!
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- cpp, python
- Domínio
- backend-api-design
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100