Linking against python library causes core dumps

Miguel A Paraz mparaz at yahoo.com
Tue Apr 9 07:06:22 EDT 2002


Hi,
I'm working on the Python interface to the FreeRADIUS AAA server
<http://www.freeradius.org>.

When linked against the Python library libpython2.2.a, and my code, it
fails like this:

#0  ptmalloc_init () at malloc.c:1713
#1  0x4026de64 in malloc_hook_ini (sz=21, caller=0x40270a34) at
malloc.c:1856
#2  0x40269f8d in __libc_malloc (bytes=21) at malloc.c:2798
#3  0x40270a34 in __strdup (s=0x810ab28 "/usr/local/etc/raddb") at
strdup.c:43
#4  0x08058b23 in main (argc=1, argv=0xbffffa0c) at radiusd.c:550
#5  0x40206507 in __libc_start_main (main=0x8058a9c <main>, argc=1, 
    ubp_av=0xbffffa0c, init=0x8056d20 <_init>, fini=0x81098e0 <_fini>,
    rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbffff9fc)
    at ../sysdeps/generic/libc-start.c:129

Where radiusd.c:550 is simply:

    radius_dir = strdup(RADIUS_DIR);


At this point, no Python functions are even called yet.
If I remove libpython from linking, it starts up fine.
I'm stumped - I see no reason why simply linking a lib would mess up
the malloc() system.

Thanks in advance!



More information about the Python-list mailing list