Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 78480 invoked from network); 4 Dec 2009 13:56:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Dec 2009 13:56:45 -0000 Received: (qmail 51360 invoked by uid 500); 4 Dec 2009 13:56:45 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 51316 invoked by uid 500); 4 Dec 2009 13:56:44 -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 51299 invoked by uid 99); 4 Dec 2009 13:56:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 13:56:44 +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; Fri, 04 Dec 2009 13:56:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AEEAF234C48D for ; Fri, 4 Dec 2009 05:56:20 -0800 (PST) Message-ID: <1284387652.1259934980715.JavaMail.jira@brutus> Date: Fri, 4 Dec 2009 13:56:20 +0000 (UTC) From: "Tim Ellison (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tim Ellison updated HARMONY-6395: --------------------------------- Fix Version/s: (was: 5.0M12) > [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 > 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.