[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#4751) back-perl crashing with anonymous search request



Full_Name: Ralf Haferkamp
Version: HEAD, RE23
OS: SUSE Linux 10.1
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (89.166.155.116)


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()).