Using Valgrind to detect Memory Leaks (still reachable)

ABOUT Memory Leak In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations[1] in such a way that memory which is no longer needed is not released. A memory leak may also happen when an object is stored in memory but cannot be …

Detecting Memory Leaks (leak: + ive)

commandline session $gcc -g leak.c $valgrind –tool=memcheck –leak-check=full ./a.out ==4353== Memcheck, a memory error detector ==4353== Copyright (C) 2002-2012, and GNU GPL’d, by Julian Seward et al. ==4353== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==4353== Command: ./a.out ==4353== ==4353== ==4353== HEAP SUMMARY: ==4353== in use at exit: 100 bytes in 1 …

Detecting Memory Leaks II

commandline session $gcc -g -ansi -pedantic -W -Wall algorithm.c algorithm.c: In function ‘main’: algorithm.c:47:5: warning: unused variable ‘value’ [-Wunused-variable] algorithm.c:36:7: warning: unused variable ‘p’ [-Wunused-variable] algorithm.c:35:5: warning: unused variable ‘i’ [-Wunused-variable] algorithm.c:34:14: warning: unused parameter ‘argc’ [-Wunused-parameter] algorithm.c:34:26: warning: unused parameter ‘argv’ [-Wunused-parameter] $valgrind –tool=memcheck –leak-check=full ./a.out ==23555== Memcheck, a memory error detector ==23555== Copyright …

Detecting Memory leaks

commandline session $valgrind –tool=memcheck –leak-check=full ./a.out ==6002== Memcheck, a memory error detector ==6002== Copyright (C) 2002-2012, and GNU GPL’d, by Julian Seward et al. ==6002== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==6002== Command: ./a.out ==6002== -31 0 1 2 2 4 100 83 99 782 ==6002== ==6002== HEAP SUMMARY: ==6002== in …

Running Unit tests

commandline session $./utils/unittest_suite.py Number of test modules found: 59 autotest.client.kernel_versions_unittest: PASS autotest.client.shared.profiler_manager_unittest: PASS autotest.mirror.database_unittest: PASS autotest.client.shared.autotemp_unittest: PASS autotest.tko.utils_unittest: PASS autotest.client.harness_unittest: PASS autotest.client.shared.hosts.base_classes_unittest: PASS autotest.client.setup_job_unittest: PASS autotest.mirror.source_unittest: PASS autotest.client.fsinfo_unittest: PASS autotest.client.shared.base_job_unittest: PASS autotest.server.hosts.remote_unittest: PASS autotest.database_legacy.database_connection_unittest: FAIL autotest.server.hosts.monitors.monitors_util_unittest: PASS autotest.server.hosts.monitors.console_patterns_unittest: FAIL autotest.client.net.net_tc_unittest: PASS autotest.client.partition_unittest: PASS autotest.cli.user_unittest: PASS autotest.scheduler.drone_manager_unittest: PASS autotest.client.local_host_unittest: PASS autotest.cli.rpc_unittest: PASS autotest.scheduler.drones_unittest: PASS autotest.cli.job_unittest: PASS …

Autotest Unittest suite. Setting up dependencies

Get The Hang $sudo ./utils/build_externals.py 20:28:50 INFO | imported setuptools version 0.6. 20:28:50 INFO | A new Setuptools is not needed on this system. 20:28:50 INFO | MySQLdb isn’t present. Will install. 20:28:50 INFO | Fetching http://downloads.sourceforge.net/project/mysql-python/mysql-python/1.2.2/MySQL-python-1.2.2.tar.gz 20:28:52 INFO | Good checksum. 20:28:52 INFO | imported django version 1.5.1. 20:28:52 INFO | A new Django …

SICP CHAPTER 1 SECTION "NAMING AND ENVIRONMENT”

commandline session $scm SCM version 5e5, Copyright (C) 1990-2006 Free Software Foundation. SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)’. This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)’ for details. ;loading /usr/share/slib/require ;done loading /usr/share/slib/require.scm ;loading /usr/share/slib/require ;done loading /usr/share/slib/require.scm ;loading /usr/lib/scm/Link ;done loading /usr/lib/scm/Link.scm …

SICP Chapter 1 Section "Expressions"

commandline session $scm SCM version 5e5, Copyright (C) 1990-2006 Free Software Foundation. SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)’. This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)’ for details. ;loading /usr/share/slib/require ;done loading /usr/share/slib/require.scm ;loading /usr/share/slib/require ;done loading /usr/share/slib/require.scm ;loading /usr/lib/scm/Link ;done loading /usr/lib/scm/Link.scm …

nmap – Network exploration tool and security / port scanner

commandline session $nmap –reason 127.0.0.1 Starting Nmap 6.00 ( http://nmap.org ) at 2013-09-06 21:58 IST Nmap scan report for localhost.localdomain (127.0.0.1) Host is up, received conn-refused (0.0013s latency). Not shown: 995 closed ports Reason: 995 conn-refused PORT STATE SERVICE REASON 22/tcp open ssh syn-ack 25/tcp open smtp syn-ack 111/tcp open rpcbind syn-ack 389/tcp open ldap …

file — determine file type

commandline session $ls faq favicon.ico index.html kernel.css mirrors pub robots.txt $file kernel.css kernel.css: ASCII text $file -l | head Set 0: Binary patterns: Text patterns: Set 1: Binary patterns: Text patterns: Set 0: Binary patterns: Strength = 340 : sc68 Atari ST music [] Strength = 340 : T64 tape Image [] $file -l | …