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

c_glib: Incorrect behaviour when serializing a map with typedef'd keys

VotersStop watchingWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.9.1
    • 0.9.2
    • C glib - Compiler
    • Fedora 20 64-bit on x86_64

    • Patch Available

    Description

      This is the same issue reported in THRIFT-2683 but for serializing maps.

      The compiler must resolve a typedef'd type to its underlying type before attempting to reason about it. By failing to do this, the current c_glib compiler will in most cases generate incorrect code for serializing a map when either its keys or its values are of a typedef'd type. The client receives garbage data instead of the map's actual contents.

      The attached patch fixes this. It should be applied after the patch for THRIFT-1266.

      No test case, yet again, but the server half of the integration test suite will trigger this bug without the patch applied.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            simonsouth Simon South
            simonsouth Simon South
            Votes:
            0 Vote for this issue
            Watchers:
            3 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment