<html>
    <head>
      <base href="http://icedtea.classpath.org/bugzilla/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crashing or data corruption with scala.collection.IndexedSeqOptimized::foldl"
   href="http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3157#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crashing or data corruption with scala.collection.IndexedSeqOptimized::foldl"
   href="http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3157">bug 3157</a>
              from <span class="vcard"><a class="email" href="mailto:apejcic@gmail.com" title="Aleksander Pejcic <apejcic@gmail.com>"> <span class="fn">Aleksander Pejcic</span></a>
</span></b>
        <pre>Hi Andrew. 

Scala code that reproduces the issue 100% of time is in description at the
bottom. Latest Scala can be used to compile it.

The issue is also reported at Scala issues:
<a href="https://issues.scala-lang.org/browse/SI-9900">https://issues.scala-lang.org/browse/SI-9900</a>

Copy/pasting it again:

---------- BEGIN SOURCE ----------
#!/usr/bin/env scala

for (i <- Range(1, 100000)) {
  val l = Array[Byte](-1, -1, -1, -1).foldLeft(0L) { case(l, b) => 
    b & 0xFF
  }
  if (l != 255) {
    println(s"FAIL: got $l after $i iterations")
    sys.exit(1)
  }
}
println("PASS")
---------- END SOURCE ----------
[reply] [−] <a href="show_bug.cgi?id=3157#c1">Comment 1</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>