Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: JRuby 1.7.0.pre1
    • Component/s: None
    • Labels:
      None
    • Environment:
      jruby 1.7.0.dev (ruby-1.9.3-p203) (2012-04-27 69c9732) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_31) [darwin-x86_64-java]
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      Two self referential structs, when compared to each other, will cause a stack overflow exception.

      I've attached a test case to demonstrate the problem. The test passes on MRI 1.9.x and stack overflows on JRuby.

      1. test.rb
        0.2 kB
        Aaron Patterson

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Fixed on my post 1.7pre branch. Will you add this as a test case for MRI 1.9.3+?

        commit 8a41ad64701f978b62f3eb1b349f731f407b3af6
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Sat May 19 11:10:17 2012 -0500
        
            Fix JRUBY-6647
            
            Comparison of a self referential struct causes a stack overflow
            
            Added execRecursiveOuter use to prevent stack overflow. Also
            modified eql? logic to do the same.
        
        Show
        Charles Oliver Nutter added a comment - Fixed on my post 1.7pre branch. Will you add this as a test case for MRI 1.9.3+? commit 8a41ad64701f978b62f3eb1b349f731f407b3af6 Author: Charles Oliver Nutter <headius@headius.com> Date: Sat May 19 11:10:17 2012 -0500 Fix JRUBY-6647 Comparison of a self referential struct causes a stack overflow Added execRecursiveOuter use to prevent stack overflow. Also modified eql? logic to do the same.
        Hide
        Aaron Patterson added a comment -

        Thanks for fixing this! I'll add a specific test for it in trunk, but I'm not sure I can get it backported to the 1.9.3 branch (since it isn't a bugfix). However, this functionality is testing in the psych tests, so it should be indirectly tested today.

        Show
        Aaron Patterson added a comment - Thanks for fixing this! I'll add a specific test for it in trunk, but I'm not sure I can get it backported to the 1.9.3 branch (since it isn't a bugfix). However, this functionality is testing in the psych tests, so it should be indirectly tested today.
        Hide
        Charles Oliver Nutter added a comment -

        That sounds fine to me, Aaron. I wonder if we could get ruby-core to open up past releases if they're just for tests, since those aren't part of the functional aspects of the release. In any case, as long as it will start getting tested through some mechanism, I'm satisfied!

        Show
        Charles Oliver Nutter added a comment - That sounds fine to me, Aaron. I wonder if we could get ruby-core to open up past releases if they're just for tests, since those aren't part of the functional aspects of the release. In any case, as long as it will start getting tested through some mechanism, I'm satisfied!

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Aaron Patterson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: