Hi everybody, <div><br></div><div>I have a couple of questions regarding modules/rlm_perl/rlm_perl.c: perl_detach(...):</div><div><br></div><div>1.  Is it correct to call PERL_SYS_TERM in detach()? </div><div><br></div><div>

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. </div>

<div><br></div><div>According to the documentation (<a href="http://perldoc.perl.org/perlembed.html">http://perldoc.perl.org/perlembed.html</a>), PERL_SYS_TERM should be called only once. In our case, it is called once per detaching thread.</div>

<div><br></div><div>2. This code: </div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>embed = rad_malloc(4*(sizeof(char *)));</div></div><div>memset(embed, 0, sizeof(4*(sizeof(char *))));</div>

</blockquote><div>looks like a misprint to me. Not that it would cause any real errors, but it is inaccurate anyway.</div><div><br></div><div>Thank you,</div><div>Anatoly.</div><div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">

<div><br></div></blockquote></div>