====== Valgrind ====== * kontrola prace s pamatou * kontrola ci sa nepouzivaju neinicializovane premenne * kontrola ci sa uvolnuje pamat po dynamicky alokovanych premennych * hlasenia Valgrindu v standardnej kniznici ( std::string::_S_construc ) a podobne su sposobene vlastnou spravou pamate standardnej knznice a nie su to uniky pamate ==== Zaujimave prepinace === * pri hlaseni conditional jumpu je dobre si medzi parametre zapnut zobrazovanie kde problemova premenna vznikla: --track-origins=yes * dalsie zaujimave parametre su: --leak-check=full --show-reachable=yes ====== libc MALLOC_CHECK_ ====== * kontroluje mazanie premennych - dvojite delete(free) Recent versions of Linux libc (later than 5.4.23) and GNU libc (2.x) include a malloc implementation which is tunable via environment variables. When MALLOC_CHECK_ is set, a special (less efficient) implementation is used which is designed to be tolerant against simple errors, such as double calls of free() with the same argument, or overruns of a single byte (off-by-one bugs). Not all such errors can be protected against, however, and memory leaks can result. **If MALLOC_CHECK_ is set to 0**, any detected heap corruption is silently ignored; **if set to 1**, a diagnostic is printed on stderr; **if set to 2**, abort() is called immediately. This can be useful because other-wise a crash may happen much later, and the true cause for the problem is then very hard to track down. ====== gdb ====== Pozri: [[howto:gdb|Problemy s debugovanim]]