mechglue loading issue

Luke Howard lukeh at padl.com
Thu Mar 17 02:05:46 EDT 2011


The mechglue has API-as-SPI, that is, it supports dynamically loading a mechanism that exports the same ABI as the mechanism glue itself (with some exceptions, which are mostly historical or otherwise my doing!).

On the platform I tested, the mechanism glue will pull in the symbol of the glue itself if a mechanism which links against the glue does not implement an entry point.

This of course is catastrophic because mechanism-specific objects will be passed to the glue functions.

I resolved this by passing RTLD_FIRST (fix is in the users/lhoward/moonshot-mechglue-fixes branch). I don't know if this is an OS X-specific issue or not; I guess it could also be resolved by not having the plug-in mechanism link against the mechanism glue, or by having mechanisms implement all entry points (impractical).

-- Luke



More information about the krbdev mailing list