boostorg / boostorg/stacktrace

stacktrace_from_exception on non-x86

Abierto
#163 7 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement help wanted
Lenguaje dominante
C++
Estrellas
494
Forks
86
Merge medio
8 d 20 h
PR fusionados (30 d)
3

Descripción

I submitted the below to the mailing list, but I wanted to re-iterate it here for more eyes. https://lists.boost.org/Archives/boost/2024/04/256604.php

This feature is guarded by BOOST_STACKTRACE_ALWAYS_STORE_IN_PADDING, but that is only enabled on [x86](https://github.com/boostorg/stacktrace/blob/a33e198cf660c213e700d6f050a4641b74ea880a/src/exception_headers.h#L9-L13).
This means that

```console
./bootstrap.sh --with-toolset=gcc --with-libraries=stacktrace
./b2 install threading=multi toolset=gcc
```

always fails to build on non-x86 platforms. There are three current workarounds:

1. set boost.stacktrace.from_exception=off
2. set BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK
3. build with threading=single

(1) prevents me from using this feature. (2) shouldn't be needed on it's face because I'm using gcc/libstdc++. (3) affects more than stacktrace.

Is this an incidental error, or is there a reason I wasn't able to deduce as to why this feature can't be used on non-x86+libstdc++?

It seems like the check for libc++ on non-x86 can't be entirely done at compile time. I definitely understand wanting to alert users to the dangers of using this feature, but there also doesn't seem to be a good way of detecting the presence of libc++ at compile time (hence the need for [is_libcpp_runtime](https://github.com/boostorg/stacktrace/blob/a33e198cf660c213e700d6f050a4641b74ea880a/src/from_exception.cpp#L81)).

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Reproduce the non-x86 build with the bootstrap.sh and b2 commands in the issue. Read src/exception_headers.h and src/from_exception.cpp, including is_libcpp_runtime, to trace the architecture and runtime checks. Done means the stacktrace library builds on non-x86 with GCC/libstdc++ without requiring the listed workarounds.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
cpp
Área
devtools
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.