mirror of
https://github.com/tweag/asterius.git
synced 2024-10-05 21:30:49 +03:00
Fallback blackholing logic when updateThunk() throws (#581)
This commit is contained in:
parent
ddb3794972
commit
15be80f35e
@ -60,12 +60,21 @@ export class ExceptionHelper {
|
||||
const p1 = Number(
|
||||
this.memory.i64Load(p + rtsConstants.offset_StgUpdateFrame_updatee)
|
||||
);
|
||||
this.exports.updateThunk(
|
||||
this.symbolTable.MainCapability,
|
||||
tso,
|
||||
p1,
|
||||
raise_closure
|
||||
);
|
||||
try {
|
||||
this.exports.updateThunk(
|
||||
this.symbolTable.MainCapability,
|
||||
tso,
|
||||
p1,
|
||||
raise_closure
|
||||
);
|
||||
} catch (err) {
|
||||
console.error(`updateThunk failed with ${err}`);
|
||||
this.memory.i64Store(p1, this.symbolTable.stg_BLACKHOLE_info);
|
||||
this.memory.i64Store(
|
||||
p1 + rtsConstants.offset_StgInd_indirectee,
|
||||
raise_closure
|
||||
);
|
||||
}
|
||||
const size = Number(raw_layout & BigInt(0x3f));
|
||||
p += (1 + size) << 3;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user