Closed Lisandrogq closed 4 months ago
Hola buenas!
Lo que te esta indicando valgrind es que estas leyendo una variable que no asignaste previamente o no hicieron el malloc correspondiente. La pregunta es, donde asignan pcb_exec
? se crea bien?
Tengo mis dudas de si sin valgrind no les rompe también, de cualquier forma la variable no la están manejando de una forma correcta
Buenass, efectivamente estabamos haciendo post al semaforo una linea antes de inicializar la variable. Lo raro es que eso nunca nos trajo(ni nos trae) problemas al correr el proceso normalmente con vscode(con Valgrind sucede siempre). Mas allá de esta curiosidad, muchas gracias por la ayuda.
Buenas, tengo un problema al utilizar Valgrind: al correr el proceso cpu con valgrind, finaliza antes de lo esperado (si lo corro desde vscode no finaliza en ese punto). Solo para dar contexto adicional por si sirve: Comenze a utilizar Valgrind para encontrar algun mal manejo de memoría, ya que tengo comportamientos raros en la funcion mov_in de cpu.
Hay una parte del log de valgrind que dice lo siguiente, no encontre razon para que finalizara
Las partes de codigo mencionadas son las siguientes:
El log de Valgrind completo: