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

Ruby library crashes when using GC.compact

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.14.1
    • 0.15.0
    • Ruby - Library
    • None
    • Patch Available
    • 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.patch
          5 kB
          Stan Hu
        2. thrift-ruby-gc-v2.patch
          5 kB
          Stan Hu

        Activity

          People

            stanhu Stan Hu
            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