FreeRADIUS 1.0.4: SEGMENTATION FAULT

Nicolas Baradakis nbk at sitadelle.com
Thu Aug 25 16:17:58 CEST 2005


Alan DeKok wrote:

> Richard Cotrina <rcc at speedy.net.pe> wrote:
> > (gdb) display mysql_sock
> > 1: mysql_sock = (rlm_sql_mysql_sock *) 0x5f6c7173
>
>   That's bad.  That's very bad.  It's the ASCII string "sql_",
> interpreted as a pointer on an x86 machine.  No wonder it crashes.
>
>   The short answer is that there appears to be some memory corruption.
> Can you print out the contents of "sqlsocket", too?  Both the
> structure contents, and the *hex* contents of that area of memory.
>
>   It looks like the sqlsocket pointer that's being passed is bad.

The infringing pointer "mysql_sock" contains the return value of
a "malloc" three lines above.

Perhaps something messed up the memory so badly that malloc returns
garbage. It's not easy to find out where the problem is : on my system
(Debian), I can run radiusd in valgrind with num_sql_socks = 20 and I
get no errors from valgrind.

-- 
Nicolas Baradakis




More information about the Freeradius-Users mailing list