On Sat, Aug 11, 2007 at 05:54:32PM +0100, Brett Parker wrote:
> The attached patch fixes the config structure when dynamic backends are
> used - the basic issue is that when the backend was loaded, it wouldn't
> (neccessarily) share the config structure with the program that called
> it (and had therefore read the config).

The problem with this is that we get multiple functions with the same
name. I'm not sure we can be certain which will evaluate first? In
particular, using the db4 backend through the dynamic backend with an
error during DB initialisation causes a segfault. The initdb in
keydb_db4 will call cleanupdb() when it hits an error, but this now
maps to the cleanupdb() in keydb_dynamic. Which, although it calls the
version in keydb_db4, will also call dlclose on the keydb_db4.so.
Meaning that control returns to a function that's no longer in memory...

The "easy" option is to have the cleanup end up as an internal function
that cleanupdb calls, but I'd need to be certain there aren't other
artifacts that will be seen from these changes.

J.

-- 
Illiterate?  Write for FREE HELP!

Attachment: signature.asc
Description: Digital signature

Reply via email to