From: Wei Liu Subject: [PATCH 4/8] gentypes: do not poison struct Date: Tue, 24 Feb 2015 14:57:00 +0000 Message-ID: <1424789824-19946-5-git-send-email-wei.liu2@citrix.com> References: <1424789824-19946-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1424789824-19946-1-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Wei Liu , ian.jackson@eu.citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org We don't want to poison the struct any more because we will later set pointers inside a struct to NULL to make it idempotent. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson --- tools/libxl/gentypes.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py index d9e14fd..cf5ec87 100644 --- a/tools/libxl/gentypes.py +++ b/tools/libxl/gentypes.py @@ -636,15 +636,12 @@ if __name__ == '__main__': #include "libxl_internal.h" -#define LIBXL_DTOR_POISON 0xa5 - """ % " ".join(sys.argv)) for ty in [t for t in types if t.dispose_fn is not None and t.autogenerate_dispose_fn]: f.write("void %s(%s)\n" % (ty.dispose_fn, ty.make_arg("p"))) f.write("{\n") f.write(libxl_C_type_dispose(ty, "p")) - f.write(" memset(p, LIBXL_DTOR_POISON, sizeof(*p));\n") f.write("}\n") f.write("\n") -- 1.9.1