Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 47262 invoked from network); 5 Jan 2010 14:23:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Jan 2010 14:23:15 -0000 Received: (qmail 3757 invoked by uid 500); 5 Jan 2010 14:23:15 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 3703 invoked by uid 500); 5 Jan 2010 14:23:15 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 3694 invoked by uid 99); 5 Jan 2010 14:23:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jan 2010 14:23:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jan 2010 14:23:14 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8E911234C48D for ; Tue, 5 Jan 2010 06:22:54 -0800 (PST) Message-ID: <633486245.44021262701374582.JavaMail.jira@brutus.apache.org> Date: Tue, 5 Jan 2010 14:22:54 +0000 (UTC) From: "Tim Ellison (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-6395) [classlib][luni] Arrays.sort(double []) will result in StackOverflowError for specific arrays input In-Reply-To: <23353269.1259581820788.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HARMONY-6395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tim Ellison resolved HARMONY-6395. ---------------------------------- Resolution: Fixed Fix Version/s: 5.0M13 Fix applied at repo revision r896060. Please verify. > [classlib][luni] Arrays.sort(double []) will result in StackOverflowError for specific arrays input > --------------------------------------------------------------------------------------------------- > > Key: HARMONY-6395 > URL: https://issues.apache.org/jira/browse/HARMONY-6395 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M11 > Reporter: Jim Yu > Assignee: Sean Qiu > Fix For: 5.0M13 > > Attachments: harmony-6395-2.patch, HARMONY-6395.diff > > > There is a simple testcase as below. You can see StackOverflowError if run this testcase. This is a defect of Arrays.sort(double []), I have attached a fix for it. > import java.util.Arrays; > public class SortTest { > public static void main(String[] args) { > double[] array = { Double.NaN, 1.0, 2.0, Double.NaN, Double.NaN, 3.0, > 4.0 }; > displayArray(array); > Arrays.sort(array); > displayArray(array); > System.out.println(); > } > private static void displayArray(double[] array) { > for (double d : array) > System.out.print(d + " "); > System.out.println(); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.