From f5ece05649298ee312841e8e16c6d7467316325c Mon Sep 17 00:00:00 2001 From: David Reiss Date: Wed, 2 Apr 2008 00:23:31 +0000 Subject: [PATCH] Fix a segfault in the compiler. We weren't initializing our pointers properly, resulting in a difficult-to-trigger segfault. Reviewed By: mcslee, bhamadani Test Plan: Built the modified search IDL. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665627 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/src/parse/t_type.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/cpp/src/parse/t_type.h b/compiler/cpp/src/parse/t_type.h index bf8d7fa7..a10e31f9 100644 --- a/compiler/cpp/src/parse/t_type.h +++ b/compiler/cpp/src/parse/t_type.h @@ -116,7 +116,9 @@ class t_type : public t_doc { protected: - t_type() { + t_type() : + program_(NULL) + { memset(fingerprint_, 0, sizeof(fingerprint_)); } @@ -134,6 +136,7 @@ class t_type : public t_doc { } t_type(std::string name) : + program_(NULL), name_(name) { memset(fingerprint_, 0, sizeof(fingerprint_)); -- 2.17.1