[Bug 3157] Crashing or data corruption with scala.collection.IndexedSeqOptimized::foldl

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Wed Aug 31 17:16:01 UTC 2016


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3157

--- Comment #2 from Aleksander Pejcic <apejcic at gmail.com> ---
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:
https://issues.scala-lang.org/browse/SI-9900

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] [−] Comment 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20160831/31d07103/attachment.html>


More information about the distro-pkg-dev mailing list