mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1849099: Report oversized allocation in lshByAbsolute r=mgaudet
I missed this case in my patch for bug 1745907. Differential Revision: https://phabricator.services.mozilla.com/D186497
This commit is contained in:
parent
bc6ac40861
commit
f221202df3
14
js/src/jit-test/tests/bigint/bug1849099.js
Normal file
14
js/src/jit-test/tests/bigint/bug1849099.js
Normal file
@ -0,0 +1,14 @@
|
||||
// |jit-test| --fast-warmup; --no-threads
|
||||
|
||||
function foo(a,b) {
|
||||
a >> a
|
||||
b ^ b
|
||||
}
|
||||
|
||||
with ({}) {}
|
||||
for (var i = 0; i < 100; i++) {
|
||||
foo(10n, -1n);
|
||||
try {
|
||||
foo(-2147483648n);
|
||||
} catch {}
|
||||
}
|
@ -2250,8 +2250,7 @@ BigInt* BigInt::lshByAbsolute(JSContext* cx, HandleBigInt x, HandleBigInt y) {
|
||||
}
|
||||
|
||||
if (y->digitLength() > 1 || y->digit(0) > MaxBitLength) {
|
||||
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
|
||||
JSMSG_BIGINT_TOO_LARGE);
|
||||
ReportOversizedAllocation(cx, JSMSG_BIGINT_TOO_LARGE);
|
||||
if (js::SupportDifferentialTesting()) {
|
||||
fprintf(stderr, "ReportOutOfMemory called\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user