Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1379

fix uninitialized enum values in thrift C++ objects

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.8
    • C++ - Library
    • None

    Description

      From f0f3d43a977fb267c671830a88de31fa7cb238ce Mon Sep 17 00:00:00 2001
      From: Doug Ihde <dihde@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

      Attachments

        Activity

          People

            davejwatson@fb Dave Watson
            davejwatson@fb Dave Watson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: