On Mon, 28 Feb 2005, Mark Burgess wrote: > Eric, I am still unsure what to do here. Where is it you think this needs to > be > re-entrant?
Inside CanonifyName() , because it gets called a lot, including twice within the same snprintf() , which is ripe for entrancy collisions. Because CanonifyName uses static storage, locks and filenames that use canonified strings end up with another invocation's results for 'buffer' -- i.e last.cfagent_conf.amine.directories.directories_3173 got the operator's answer for both CanonifyName(operator) and Canonifyname(operand). I tried wrapping a mutex around it but it didn't help. Dynamically allocated storage is really the best way to fix this. I think it's important to fix both from a correctness standpoint and because it is causing obscure problems for people which are hard to troubleshoot. -- - Eric Sorenson - Explosive Networking - http://eric.explosive.net - _______________________________________________ Bug-cfengine mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-cfengine
