[Date Prev][Date Next]
(ITS#4751) back-perl crashing with anonymous search request
Full_Name: Ralf Haferkamp
Version: HEAD, RE23
OS: SUSE Linux 10.1
Submission from: (NULL) (188.8.131.52)
I created a simple back-perl setup with the SampleLDAP.pm Module (slightly
enhanced with a bind() method that just returns SUCCESS) from CVS Head and slapd
crashed on me immediately on receiving the first anonymous search request.
It survived however when I issued bind requests followed by search request.
While digging through the code I found that back_perl_bind calls
"PERL_SET_CONTEXT( PERL_INTERPRETER );" since a few revisions. All other
back_perl_* functions (search, delete, modify, ...) do not call
PERL_SET_CONTEXT, adding that seems to fix the crash.
The perlembed man-pages state related to PERL_SET_CONTEXT:
"PERL_SET_CONTEXT(interp) should also be called whenever "interp" is used by a
thread that did not create it (using either perl_alloc(), ..."
I'll commit a fix that adds PERL_SET_CONTEXT calls to the other functions as
well (wrapped behind #ifdefs just like in back_perl_bind()).