-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayIndexOutOfBoundsException thrown when compile long js #529
Comments
We use the default CompilerEnvirons which mean we just new a CompilerEnvirons and don't invoke any set method. we tried the newest version of rhino but still not work. |
private void finalizeSuperBlockStarts() {
if (GenerateStackMap) {
for (int i = 0; i < itsExceptionTableTop; i++) {
ExceptionTableEntry ete = itsExceptionTable[i];
// it seems the getLabelPC return value more than 32767
short handlerPC = (short) getLabelPC(ete.itsHandlerLabel);
addSuperBlockStart(handlerPC);
} |
After i do some change as below in ClassFileWriter.java, it seems ok. but i'm not sure it's affect. short xxx = (short) getLabelPC(...) to int xxx = getLabelPC(...) |
Did some history check, this was introduced with commit f81158c in 2010. For me it looks like some refactoring leftover because both involved methods are working with int's. |
sorry, i'm not sure what you are talking about... what if i need to fix it temporarily? |
I also ran into this issue today. Will it be fixed? |
Fix is on the way... |
When we upgrade rhino from 1.7.R4 to 1.7.7.1, compilation error occurs for an exists long js which is ok in 1.7.R4.
the js has 2445 lines and 82277 characters, contains java importer, inner function and many comments. Before we upgrde the rhino, it's ok, we try to debug the source code and it's too complex to find out the root cause.
the js file structure is like this
JDK 1.8
Version:1.7.7.1
The text was updated successfully, but these errors were encountered: