Is there a memory leak?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
Línea de trabajo
Start by reproducing the reported growth with the linked Godbolt example, then trace how repeated assignments to YAML::Node manage shared memory. Compare memory use across iterations and identify whether retained allocations come from the node assignment path; done means the behavior is explained and, if confirmed as a leak, a focused regression test demonstrates the fix.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi,
I am using yaml-cpp for parsing/emitting YAML because it is very simple and flexible as it comes with many predefined type conversions which can easily be extended.
However, the behaviour of the underlying shared memory management is surprising to say the least: in a simple example as the following, the memory usage will increase out of bounds (several GBytes before the program gets killed).
YAML::Node node;
node["test"] = 42;
for(auto i=0; i<10000000; ++i) {
node["test"] = 42;
}
There is a live repro here: https://godbolt.org/z/4PWezz16r. I first issued an open question on stackoverflow here: https://stackoverflow.com/staging-ground/79939206
While the example is rather artificial, we have cases where we read and override configuration data (YAML) many times, and having such behaviour as described above makes us hesitate to use yaml-cpp.
Thanks for any hints on this. Cheers,
Ralf
- Lenguaje dominante
- C++
- Estrellas
- 6.1k
- Forks
- 2.2k
- Merge medio
- 22 h 2 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de jbeder/yaml-cpp
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Explicit `!!null` tag with empty content loads as a Scalar node instead of NullPosiblemente ocupada @ppc64el la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
-
Dificultad 3/5 Medio día Aptitud para principiantes 55/100
Todos los issues de jbeder/yaml-cpp
Issues similares
-
parse_selu lowering loses catastrophic cancellation → silent 0.0 for moderate positive inputsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ROCm/AMDMIGraphX#5490 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
arvidn/libtorrent#9126 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Sunrisepeak/mcpp-language-server#80 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
#2754 make deepseek api not workAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
xiaoyifang/goldendict-ng#3148 ·
Los mantenedores suelen responder en 1 día