purify and python
Ralph Heinkel
heinkel at dummy.embl-heidelberg.de
Mon Jan 10 05:53:49 EST 2000
Hi,
since I wrote some C, C++, and F77 extensions for python, I am planning
to use purify to test them for memory leaks and so on.
The problem is that I cannot get a purified version of python running.
Python seems to start and immediately exit with error code -1 (255),
without printing any error message (See below for log). I never get
to the python command line.
The way I linked python is shown below. Linking python without purify
(without any other recompilation) produces a working python version.
Any clue?
I am running python 1.5.2 on IRIX 6.5 (R10000) with purify 4.1. Python
was configure with --with-thread and --without-gcc
Ralph
---------------------------------------------------------------------
Modules/Setup is:
# Pure module. Cannot be linked dynamically.
# -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE
WHICH_PURE_PRODUCTS=-DWITH_PURIFY
PURE_INCLS=-I/usr/pure/purify
PURE_STUBLIBS=-L/usr/pure/purify -lpurify_stubs -lquantify_stubs
pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS) $(PURE_STUBLIBS)
The (python) modules are linked statically, i.e. *shared* not used
This is how I linked it:
birdie:src/Python-1.5.2/Modules$ purify -windows=no cc -g python.o \
../libpython1.5.a -DWITH_PURIFY -I/usr/pure/purify -L/usr/pure/purify \
-lpurify_stubs_n32 -lpthread -lmpc -lm -o python
ld32: WARNING 84: /usr/lib32/mips4/libmpc.a is not used for resolving
any symbol.
Purify 4.1 IRIX6, Copyright (C) 1992-1997 Rational Software Corp. All
rights reserved.
.... Processing "/usr/pure/purify/libpurify_stubs_n32.so"
.... Processing "/usr/lib32/libpthread.so"
.... Processing "/usr/lib32/libm.so"
.... Processing "/usr/lib32/libc.so.1"
.... Processing "python"
This is the output:
birdie:src/Python-1.5.2/Modules$ ./python
**** Purify instrumented ./python (pid 63792545 at Mon Jan 10 11:48:44 2000)
* Purify 4.1 IRIX6, Copyright (C) 1992-1997 Rational Software Corp.
All rights reserved.
* For contact information type: "purify -help"
* Command-line: ./python
* Options settings: -purify -windows=no -purify-home=/usr/pure/purify
* Purify licensed to European Molecular Biology La
* Purify checking enabled.
**** Purify instrumented ./python (pid 63792545) ****
Current file descriptors in use: 5
FIU: file descriptor 0: <stdin>
FIU: file descriptor 1: <stdout>
FIU: file descriptor 2: <stderr>
FIU: file descriptor 26: <reserved for Purify internal use>
FIU: file descriptor 27: <reserved for Purify internal use>
**** Purify instrumented ./python (pid 63792545) ****
Purify: Searching for all memory leaks...
**** Purify instrumented ./python (pid 63792545) ****
SIG: Signal handled:
* This is occurring while in:
_x_open [open.s:16]
_exit [syscalls.c:5478]
exit_certain [fork.c:202]
_SGIPT_libc_exit [fork.c:253]
ptctl [libcthread.c:149]
__exit [cuexit.c:60]
* Received signal 48 (SIGReserved48 - System reserved signal 48)
* Handler function:
sched_handler [vp.c:243]
* Signal mask: (SIGReserved48)
* Pending signals:
Memory leaked: 0 bytes (0%); potentially leaked: 2048 bytes (1.12%)
PLK: 2048 bytes potentially leaked at 0x1010c558
* This memory was allocated from:
_malloc [malloc.c:886]
vp_alloc [vp.c:1214]
Purify Heap Analysis (combining suppressed and unsuppressed blocks)
Blocks Bytes
Leaked 0 0
Potentially Leaked 1 2048
In-Use 4 180236
----------------------------------------
Total Allocated 5 182284
**** Purify instrumented ./python (pid 63792545) ****
* Program exited with status code -1.
* 1 access error, 1 total occurrence.
* 0 bytes leaked.
* 2048 bytes potentially leaked.
* Basic memory usage (including Purify overhead):
2179072 code
169108 data/bss
195436 heap (peak use)
4960 stack
* Shared library memory usage (including Purify overhead):
425984 rtlib_n32.so (shared code)
57812 rtlib_n32.so (private data)
16384 libpurify_stubs_n32.so.pure (shared code)
160 libpurify_stubs_n32.so.pure (private data)
212992 libpthread.so.pure.1b7a5a8a8 (shared code)
3680 libpthread.so.pure.1b7a5a8a8 (private data)
475136 libm.so.pure.18462ee2e (shared code)
95696 libm.so.pure.18462ee2e (private data)
2883584 libc.so.1.pure.9f4e4221 (shared code)
70640 libc.so.1.pure.9f4e4221 (private data)
* Memory mapped usage:
49152 mmap'd at 0x4888000
1425408 mmap'd at 0x48c8000
262144 mmap'd at 0x4714000
49152 mmap'd at 0x4020000
4259840 mmap'd at 0x42f4000
20480 mmap'd at 0x48b0000
--
------------------------------------------------------
Ralph Heinkel
European Molecular Biology Laboratory (EMBL)
Meyerhofstr. 1
69012 Heidelberg
Tel. +49 6221/387 529
eMail: heinkel at embl-heidelberg.de
More information about the Python-list
mailing list