Linking against python library causes core dumps
Oleg Broytmann
phd at phd.pp.ru
Tue Apr 9 07:17:05 EDT 2002
On Tue, Apr 09, 2002 at 04:06:22AM -0700, Miguel A Paraz wrote:
> 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
pthread malloc?
> #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.
Looks like a problem with threaded Python with non-threaded freeradius.
Or vice versa.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list