Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-3882

Regression with -optimise: "Illegal index: 0 overlaps List((variable par1,LONG))"

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Optimizer
    • Labels:

      Description

      Fails as below since at least r23034, up to and including r23144. Compiles with 2.8.0 and the 2.8.1 RCs.

      % scalac29 -d /tmp -optimise src/library/scala/collection/immutable/LongMap.scala
      error: Illegal index: 0 overlaps List((variable par1,LONG))
      error: Illegal index: 0 overlaps List((variable par1,LONG))
      two errors found
      

        Attachments

          Activity

          Hide
          ureche Vlad Ureche added a comment -

          I fixed this in the trait inlining branch – https://github.com/VladUreche/scala/tree/issue/4767-clean
          IIRC, it's caused by the iCodeReader reading javac-generated bytecode where locals are recycled, but I might be wrong as I fixed a handful of icode reader errors in that branch.

          Now, regarding the bug itself, which is legitimate, I suggest we revisit it once we have GenBCode running - my feeling is that working with bytecode instead of icode should improve the stability. But I won't close it until I see the message gone.

          Show
          ureche Vlad Ureche added a comment - I fixed this in the trait inlining branch – https://github.com/VladUreche/scala/tree/issue/4767-clean IIRC, it's caused by the iCodeReader reading javac-generated bytecode where locals are recycled, but I might be wrong as I fixed a handful of icode reader errors in that branch. Now, regarding the bug itself, which is legitimate, I suggest we revisit it once we have GenBCode running - my feeling is that working with bytecode instead of icode should improve the stability. But I won't close it until I see the message gone.
          Hide
          ureche Vlad Ureche added a comment -

          Actually, the bug is not too legitimate, it's just the fact that it prints those scary error messages – ICodeReader won't ever be capable of handling recycled locals, so it won't load the bytecode for the method and it won't inline it. Not harmful in any way.

          See also:
          https://github.com/VladUreche/scala/commit/f2e22730065e1e49dba6ef91a82303d483c513ec#L6R969
          https://github.com/VladUreche/scala/commit/f2e22730065e1e49dba6ef91a82303d483c513ec#L6L939

          Show
          ureche Vlad Ureche added a comment - Actually, the bug is not too legitimate, it's just the fact that it prints those scary error messages – ICodeReader won't ever be capable of handling recycled locals, so it won't load the bytecode for the method and it won't inline it. Not harmful in any way. See also: https://github.com/VladUreche/scala/commit/f2e22730065e1e49dba6ef91a82303d483c513ec#L6R969 https://github.com/VladUreche/scala/commit/f2e22730065e1e49dba6ef91a82303d483c513ec#L6L939
          Hide
          moors Adriaan Moors added a comment -

          Un-assigning to foster work stealing, as announced in https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/o8WG4plpNkw

          Show
          moors Adriaan Moors added a comment - Un-assigning to foster work stealing, as announced in https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/o8WG4plpNkw
          Hide
          moors Adriaan Moors added a comment -

          Unassigning and rescheduling to M6 as previous deadline was missed.

          Show
          moors Adriaan Moors added a comment - Unassigning and rescheduling to M6 as previous deadline was missed.
          Hide
          magarcia Miguel Garcia added a comment -

          The new optimizer http://magarciaepfl.github.io/scala/ isn't prone to ICodeReader bugs (because it doesn't use it anymore).

          Show
          magarcia Miguel Garcia added a comment - The new optimizer http://magarciaepfl.github.io/scala/ isn't prone to ICodeReader bugs (because it doesn't use it anymore).

            People

            • Assignee:
              Unassigned
              Reporter:
              extempore Paul Phillips
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: