On Fri, Dec 03, 2004, Dmitry Belyavsky wrote:
> Hello!
>
> On Fri, 3 Dec 2004, Dmitry Belyavsky wrote:
>
> > I have custom dynamically-loaded engine implementing some non-standard
> > algorithms. So I register NIDs using OBJ_create from engine bind function.
> > Registering code looks like
> >
> > my_NID = OBJ_create("1.2.3.4.5","OID_example","Our example OID");
> >
> > On unload I get segfault in apps_shutdown. It happens in
> > OBJ_NAME_cleanup. It looks like OBJ_NAME_cleanup tries to free memory
> > belongs to unloaded library.
> >
> > What should I do to avoid this?
>
> I found out segfault happens because function registered as
> ENGINE_set_destroy_function is never called. When it is called (for
> example, when I use engine only to calc digest), there are some memory
> leaks looks like they are because of registering objects.
>
> --
> SY, Dmitry Belyavsky (ICQ UIN 11116575)
>
I hacked up a quick dynamic engine that called OBJ_create() only and I couldn't
reproduce this. I used the autoconfig mechanism mentioned in config(5) to
load it. The object was added, it was recognized by asn1parse and there were
no leaks on shutdown.
Are you calling OBJ_cleanup() for example in the dynamic engine?
Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]