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

plugin.thrift t_const_value is not used as a union in C++ code -- fix this

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.12.0
    • Component/s: Compiler (General)
    • Labels:
      None
    • Environment:

      Ubuntu 16.04 amd64

      Description

      plugin.thrift defines t_const_value as a union. But in plugin_output.cc and plugin.cc, the converters clearly either (a) SET NEITHER of identifier_val & enum_val, or (b) SET BOTH. But these are two different fields in the union. So clearly, the type t_const_value isn't being treated as a union.

      I think we need to fix Thrift's treatment of unions, but independently, the plugin should use Thrift's type system in a correct manner. This is easy-to-fix, but since the current plugin relies on a bug, the fix will be a breaking change.

        Attachments

          Activity

            People

            • Assignee:
              jking3 James E. King III
              Reporter:
              chetmurthy Chet Murthy
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: