author | Alex Crichton <acrichton@mozilla.com> |
Fri, 24 Aug 2012 09:47:42 -0700 | |
changeset 103333 | f2146a6c104e87e943d08c89b89d1dbac6f544f9 |
parent 103332 | 6a6f205e757045642d6a9a020db56fcf942275fd |
child 103336 | 35431a5588e0186b2a176d51927f9962d47e0044 |
push id | 13945 |
push user | ryanvm@gmail.com |
push date | Fri, 24 Aug 2012 20:18:14 +0000 |
treeherder | mozilla-inbound@b3c861bd1e2f [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jorendorff |
bugs | 785175 |
milestone | 17.0a1 |
first release with | nightly linux32
f2146a6c104e
/
17.0a1
/
20120824101755
/
files
nightly linux64
f2146a6c104e
/
17.0a1
/
20120824101755
/
files
nightly mac
f2146a6c104e
/
17.0a1
/
20120824101755
/
files
nightly win32
f2146a6c104e
/
17.0a1
/
20120824101755
/
files
nightly win64
f2146a6c104e
/
17.0a1
/
20120824101755
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
17.0a1
/
20120824101755
/
pushlog to previous
nightly linux64
17.0a1
/
20120824101755
/
pushlog to previous
nightly mac
17.0a1
/
20120824101755
/
pushlog to previous
nightly win32
17.0a1
/
20120824101755
/
pushlog to previous
nightly win64
17.0a1
/
20120824101755
/
pushlog to previous
|
js/src/frontend/BytecodeEmitter.cpp | file | annotate | diff | comparison | revisions | |
js/src/jit-test/tests/basic/bug785175.js | file | annotate | diff | comparison | revisions |
--- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -426,18 +426,22 @@ UpdateSourceCoordNotes(JSContext *cx, By return false; ptrdiff_t colspan = ptrdiff_t(pos.index) - ptrdiff_t(bce->current->lastColumn); if (colspan != 0) { if (colspan < 0) { colspan += SN_COLSPAN_DOMAIN; } else if (colspan >= SN_COLSPAN_DOMAIN / 2) { - ReportStatementTooLarge(cx, bce->topStmt); - return false; + // If the column span is so large that we can't store it, then just + // discard this information because column information would most + // likely be useless anyway once the column numbers are ~4000000. + // This has been known to happen with scripts that have been + // minimized and put into all one line. + return true; } if (NewSrcNote2(cx, bce, SRC_COLSPAN, colspan) < 0) return false; bce->current->lastColumn = pos.index; } return true; }
new file mode 100644 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug785175.js @@ -0,0 +1,9 @@ +var str = ' '; +// Generate a 4MB string = 2^(20+2) +for (var i = 0; i < 22; i++) { + str = str + str; +} +str += 'var a = 1 + 1;'; + +// don't throw an exception even though the column numbers cannot be maintained +eval(str);