Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356315

Summary: [parser] Stack overflow when importing javascript file containing large math expression (BinaryExpression)
Product: [WebTools] JSDT Reporter: Richard <ultique42>
Component: GeneralAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED WONTFIX QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun, remy.suen, thatnitind
Version: 3.3   
Target Milestone: 3.4   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
javascript with big expression.
none
eclipse log with stacktrace none

Description Richard CLA 2011-08-31 08:43:24 EDT
Build Identifier: 20110615-0604

Very large mathematical expression in javascript causes a stack overflow.

Eclipse workspace becomes unusable until the file is removed using the file system.  Turning off all validation has no effect.

See attached log.

This is admittedly obscure.  This 'malicious' javascript is for browser security tests.



Reproducible: Always

Steps to Reproduce:
1. Create new Dynamic Web Project
2. Import the attached file "arith_100000.js" into the WebContent folder
3. Stack overflows.
Comment 1 Richard CLA 2011-08-31 08:44:35 EDT
Created attachment 202511 [details]
javascript with big expression.
Comment 2 Richard CLA 2011-08-31 08:45:34 EDT
Created attachment 202512 [details]
eclipse log with stacktrace
Comment 3 Nitin Dahyabhai CLA 2011-08-31 09:11:10 EDT
Given that the looping in the stack trace varies, this might be a legitimate overflow of the stack rather than a bug.
Comment 4 Olivier Thomann CLA 2011-08-31 12:27:12 EDT
You can increase the size of the stack using -Xss option on Oracle VMs.
For example, ... -vmargs -Xss1M ...
Comment 5 Olivier Thomann CLA 2011-08-31 12:28:51 EDT
No code change is expected.
Comment 6 Olivier Thomann CLA 2011-09-09 09:25:09 EDT
Closing as WONTFIX. No changes planned to fix this.