[ https://issues.apache.org/jira/browse/THRIFT-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122476#comment-13122476 ]
Hudson commented on THRIFT-1379: -------------------------------- Integrated in Thrift #291 (See [https://builds.apache.org/job/Thrift/291/]) Thrift-1379: fix uninitialized enum values in thrift C++ objects Client: cpp Patch: Dave Watson The thrift-generated code for C++ class objects does not provide any initialization for enum values, so they wind up containing random/uninitialized data. This causes problems when clients do not send argument data, as the server receives random data rather than zero for unpassed args. Enums should be initialized to zero. > fix uninitialized enum values in thrift C++ objects > ---------------------------------------------------- > > Key: THRIFT-1379 > URL: https://issues.apache.org/jira/browse/THRIFT-1379 > Project: Thrift > Issue Type: Improvement > Components: C++ - Library > Reporter: Dave Watson > Assignee: Dave Watson > Priority: Minor > Fix For: 0.8 > > Attachments: > 0009-fix-uninitialized-enum-values-in-thrift-C-objects.patch > > > From f0f3d43a977fb267c671830a88de31fa7cb238ce Mon Sep 17 00:00:00 2001 > From: Doug Ihde <di...@fb.com> > Date: Tue, 11 May 2010 23:22:39 +0000 > Subject: [PATCH 9/9] fix uninitialized enum values in thrift C++ objects > Summary: > The thrift-generated code for C++ class objects does not provide any > initialization for enum values, so they wind up containing > random/uninitialized > data. This causes problems when clients do not send argument data, as the > server > receives random data rather than zero for unpassed args. > Enums should be initialized to zero. > Test Plan: > Made a test thrift file to make sure generated code is as expected. > Revert Plan: > OK > --- > compiler/cpp/src/generate/t_cpp_generator.cc | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira