mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1171909 - Check for alloc failure initializing AssemblerBufferWithConstantPools and update error handling ExceptionHandlerBailout r=jandem
This commit is contained in:
parent
ee75b8af17
commit
676d9ffdfd
3
js/src/jit-test/tests/gc/bug-1171909.js
Normal file
3
js/src/jit-test/tests/gc/bug-1171909.js
Normal file
@ -0,0 +1,3 @@
|
||||
// |jit-test| --no-ggc; allow-unhandlable-oom
|
||||
load(libdir + 'oomTest.js');
|
||||
oomTest((function(x) { assertEq(x + y + ex, 25); }));
|
@ -221,19 +221,18 @@ jit::ExceptionHandlerBailout(JSContext* cx, const InlineFrameIterator& frame,
|
||||
rfe->target = cx->runtime()->jitRuntime()->getBailoutTail()->raw();
|
||||
rfe->bailoutInfo = bailoutInfo;
|
||||
} else {
|
||||
// Bailout failed. If there was a fatal error, clear the
|
||||
// exception to turn this into an uncatchable error. If the
|
||||
// overrecursion check failed, continue popping all inline
|
||||
// frames and have the caller report an overrecursion error.
|
||||
// Bailout failed. If the overrecursion check failed, clear the
|
||||
// exception to turn this into an uncatchable error, continue popping
|
||||
// all inline frames and have the caller report the error.
|
||||
MOZ_ASSERT(!bailoutInfo);
|
||||
|
||||
if (!excInfo.propagatingIonExceptionForDebugMode())
|
||||
cx->clearPendingException();
|
||||
|
||||
if (retval == BAILOUT_RETURN_OVERRECURSED)
|
||||
if (retval == BAILOUT_RETURN_OVERRECURSED) {
|
||||
*overrecursed = true;
|
||||
else
|
||||
if (!excInfo.propagatingIonExceptionForDebugMode())
|
||||
cx->clearPendingException();
|
||||
} else {
|
||||
MOZ_ASSERT(retval == BAILOUT_RETURN_FATAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
// Make the frame being bailed out the top profiled frame.
|
||||
|
@ -460,6 +460,10 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
|
||||
// MacroAssembler before allocating any space.
|
||||
void initWithAllocator() {
|
||||
poolInfo_ = this->lifoAlloc_.template newArrayUninitialized<PoolInfo>(poolInfoSize_);
|
||||
if (!poolInfo_) {
|
||||
this->fail_oom();
|
||||
return;
|
||||
}
|
||||
|
||||
new (&pool_) Pool (poolMaxOffset_, pcBias_, this->lifoAlloc_);
|
||||
if (pool_.poolData() == nullptr)
|
||||
|
Loading…
Reference in New Issue
Block a user