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

Ruby library crashes when using GC.compact

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.14.1
    • Fix Version/s: 0.15.0
    • Component/s: Ruby - Library
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Flags:
      Patch

      Description

      Ruby v2.7 introduced support for a compacting garbage collector (https://bugs.ruby-lang.org/issues/15626) that can be invoked via `GC.compact`.

       

      The Thrift library does not mark its global constants, so seg faults appear when using `GC.compact`.

       

      The attached patch appears to fix the problem and makes tests pass in Ruby v2.7 and v3.0.

        Attachments

        1. thrift-ruby-gc-v2.patch
          5 kB
          Stan Hu
        2. thrift-ruby-gc.patch
          5 kB
          Stan Hu

          Activity

            People

            • Assignee:
              stanhu Stan Hu
              Reporter:
              stanhu Stan Hu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h