rlm_perl.c questions

Boian Jordanov bjordanov at orbitel.bg
Thu Jan 6 10:09:28 CET 2011


On Jan 6, 2011, at 1:51 AM, Anatoly Ivanov wrote:

> Hi everybody,
> 
> I have a couple of questions regarding modules/rlm_perl/rlm_perl.c:
> perl_detach(...):
> 
> 1.  Is it correct to call PERL_SYS_TERM in detach()?
> 
> I am experiencing quite random and unpredictable segfaults with radius 2.1.8
> and rlm_perl, and it really looks like memory allocation/multithreading
> error. I have very similar system running radius 2.1.7, and it works just
> fine. The most significant difference in rlm_perl between 2.1.7 and 2.1.8 is
> that PERL_SYS_TERM call.

You have the source - just comment it out and try. 
Off course it will be better if you can provide an gdb trace. Let me know if you don't how to get it accurate.

> 
> According to the documentation
> (http://perldoc.perl.org/perlembed.html), PERL_SYS_TERM
> should be called only once. In our case, it is called once per detaching
> thread.
> 
> 2. This code:
> 
> embed = rad_malloc(4*(sizeof(char *)));
> memset(embed, 0, sizeof(4*(sizeof(char *))));
> 
> looks like a misprint to me. Not that it would cause any real errors, but it
> is inaccurate anyway.
> 
> Thank you,
> Anatoly.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html

Best Regards,
Boian Jordanov
Head of Voice Department
tel. +359 2 4004 723
tel. +359 2 4004 002










More information about the Freeradius-Devel mailing list