Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356315 - [parser] Stack overflow when importing javascript file containing large math expression (BinaryExpression)
Summary: [parser] Stack overflow when importing javascript file containing large math ...
Status: RESOLVED WONTFIX
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4   Edit
Assignee: Olivier Thomann CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-31 08:43 EDT by Richard CLA
Modified: 2011-09-09 09:25 EDT (History)
3 users (show)

See Also:


Attachments
javascript with big expression. (1.29 MB, text/plain)
2011-08-31 08:44 EDT, Richard CLA
no flags Details
eclipse log with stacktrace (400.04 KB, text/plain)
2011-08-31 08:45 EDT, Richard CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.