From ac8d316a08cffd951a883936a9966388ca3e54ee Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Wed, 2 Feb 2011 14:12:45 -0800 Subject: Fix for #5755 -- making zaml serialization robust over projected objects The core problem arose when the fix for #5048 in 31118fe85aca4 introduced a hook to replace objects dynamically durring serialization so that they could be projected / rewritten to a different form for backward compatability. The serialization code assumed that all objects being serialized would remain valid until the serialization was complete, but nothing retained a copy of the temporary objects created in the hook. To resolve this, the serialization layer now maintains a ref to each such object and clears them (to allow GC) after serialization is complete. Paired-with: Jesse Wolfe Paired-with: Paul Berry --- lib/puppet/util/zaml.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/puppet/util/zaml.rb b/lib/puppet/util/zaml.rb index 14aa90e5f..b22dfc199 100644 --- a/lib/puppet/util/zaml.rb +++ b/lib/puppet/util/zaml.rb @@ -20,6 +20,7 @@ class ZAML def self.dump(stuff, where='') z = new stuff.to_zaml(z) + Label.counter_reset where << z.to_s end # @@ -61,6 +62,7 @@ class ZAML end def initialize(obj) @this_label_number = nil + @obj = obj # prevent garbage collection so that object id isn't reused @@previously_emitted_object[obj.object_id] = self end def to_s -- cgit From 70a43c4b0d3018a39e29c50b1caf7dec38694323 Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Thu, 3 Feb 2011 18:44:13 -0800 Subject: Updated CHANGELOG and version for 2.6.5rc1 --- lib/puppet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet.rb b/lib/puppet.rb index a58d3c801..5c3e7f18b 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -24,7 +24,7 @@ require 'puppet/util/run_mode' # it's also a place to find top-level commands like 'debug' module Puppet - PUPPETVERSION = '2.6.4' + PUPPETVERSION = '2.6.5' def Puppet.version PUPPETVERSION -- cgit