Bug 168060 - OS Craches when a java.lang.NegativeArraySizeException is thrown
Summary: OS Craches when a java.lang.NegativeArraySizeException is thrown
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: vm
Depends on:
Blocks:
 
Reported: 2006-12-14 09:53 EST by André Figueiredo CLA
Modified: 2007-01-30 14:00 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description André Figueiredo CLA 2006-12-14 09:53:47 EST
OS: Linux (Fedora3) - Kernel: 2.6.9-1.667 - arch: i686
Java: 1.6.0
-----

The following code should throw java.lang.NegativeArraySizeException, and when it happens the OS craches and nothing more can be done, but restart the OS through pressing the restating button.

It just happens when I run this code inside the Eclipse.

public class Testador {

    public static void main(String[] args) throws Exception {
        
        byte[] b = new byte[-120120];
        
    }
}
Comment 1 Olivier Thomann CLA 2006-12-14 09:59:27 EST
Moving to JDT/Debug
Comment 2 Darin Wright CLA 2006-12-14 10:04:53 EST
Did you run or debug the code? What happens when you run or debug the same code outside Eclipse? Anything in the .log file?
Comment 3 André Figueiredo CLA 2006-12-14 12:43:04 EST
It happens when I run such code.

Unfortunately I cannot reproduce such erro outside the Eclipse even though inside the Eclipse but in other workspace. I mean: (1) when I run it outside the Eclipse it works properly; (2) when I run it inside the Eclipse, but in a different workspace, it works properly; (3) when I run it inside the Eclipse, in my usual workspace, it craches the OS.

The expected output of such code which can be seen in the standard IO for (1) and (2) is:

Exception in thread "main" java.lang.NegativeArraySizeException
	at Testador.main(Testador.java:16)

Comment 4 Michael Rennie CLA 2007-01-30 14:00:51 EST
I have not been able to reproduce this bug, and if it works outside of eclipse and inside of eclipse with other workspaces, I am inclinded to think there is something wrong with your current workspace.

marking as WORKSFORME