RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall
Root: /v/rpm/cvs Email: rse@rpm5.org
Module: rpm Date: 19-Jul-2007 10:46:40
Branch: HEAD Handle: 2007071909464000
Added files:
rpm .dmalloc.bashrc .dmallocrc
Modified files:
rpm INSTALL
Log:
make the DMalloc stuff more easy and out-of-the-box usable
Summary:
Revision Changes Path
2.1 +10 -0 rpm/.dmalloc.bashrc
2.1 +25 -0 rpm/.dmallocrc
2.36 +4 -26 rpm/INSTALL
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/.dmalloc.bashrc
============================================================================
$ cvs diff -u -r0 -r2.1 .dmalloc.bashrc
--- /dev/null 2007-07-19 10:45:04 +0200
+++ .dmalloc.bashrc 2007-07-19 10:46:40 +0200
@@ -0,0 +1,10 @@
+##
+## .dmalloc.bashrc -- DMalloc GNU bash glue
+##
+
+__dmallocrc="`pwd`/.dmallocrc"
+
+dmalloc () {
+ eval `command dmalloc -b -f ${__dmallocrc} ${1+"$@"}`
+}
+
@@ .
patch -p0 <<'@@ .'
Index: rpm/.dmallocrc
============================================================================
$ cvs diff -u -r0 -r2.1 .dmallocrc
--- /dev/null 2007-07-19 10:45:04 +0200
+++ .dmallocrc 2007-07-19 10:46:40 +0200
@@ -0,0 +1,25 @@
+##
+## .dmallocrc -- DMalloc configuration
+##
+
+# no debugging
+none none
+
+# basic debugging
+debug1 log-stats, log-non-free, check-fence
+
+# more logging and some heap checking
+debug2 log-stats, log-non-free, check-fence, \
+ log-trans, check-heap
+
+# good utilities
+debug3 log-stats, log-non-free, check-fence, \
+ log-trans, check-heap, \
+ log-admin, realloc-copy, free-blank
+
+# even more good utilities
+debug4 log-stats, log-non-free, check-fence, \
+ log-trans, check-heap, \
+ log-admin, realloc-copy, free-blank, \
+ log-bad-space, log-nonfree-space
+
@@ .
patch -p0 <<'@@ .'
Index: rpm/INSTALL
============================================================================
$ cvs diff -u -r2.35 -r2.36 INSTALL
--- rpm/INSTALL 19 Jul 2007 08:37:48 -0000 2.35
+++ rpm/INSTALL 19 Jul 2007 08:46:40 -0000 2.36
@@ -300,39 +300,17 @@
$ make
$ make install
-3. Create a ~/.dmallocrc containing:
-
- # no debugging
- none none
-
- # basic debugging
- debug1 log-stats, log-non-free, check-fence
-
- # more logging and some heap checking
- debug2 log-stats, log-non-free, check-fence, \
- log-trans, check-heap
-
- # good utilities
- debug3 log-stats, log-non-free, check-fence, \
- log-trans, check-heap, \
- log-admin, realloc-copy, free-blank
-
- # even more good utilities
- debug4 log-stats, log-non-free, check-fence, \
- log-trans, check-heap, \
- log-admin, realloc-copy, free-blank, \
- log-bad-space, log-nonfree-space
-
-4. Enable dmalloc debugging with:
+3. Enable dmalloc debugging with:
+ $ . .dmalloc.bashrc
$ dmalloc -l dmalloc.log
$ dmalloc debug3
-5. Run RPM:
+4. Run RPM:
$ /tmp/rpm/bin/rpm [...]
-6. Inspect the results:
+5. Inspect the results:
(notice that some used functions like gethostbyname(3) or dirname(3)
from the vendor libc inherently leak memory because of their API
style and because libc isn't DMalloc instrumented you will often see
@@ .
Received on Thu Jul 19 10:46:40 2007