Repository navigation
Conversation
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Beyond the inline findings, I also checked the re-entry path after a cut-short module: the next Evaluate() passes step 3's m_evaluationError assert (jsNull is a non-empty value), InnerModuleEvaluation rethrows null, and step 9.c's evaluationError() == exception->value() holds, so the second import() rejects with null without tripping an assert. The nested-walk case (scenario 4) is also fine: the inner Evaluate() only marks its own stack, so the outer walk's per-record Evaluating assert is not violated.
Extended reasoning...
The engine change is a single guarded arm in CyclicModuleRecord::evaluate() step 9 for termination exceptions, plus a new fork-only stress test and fixtures; it touches no security-sensitive surface. Inline findings cover the Link()-time sibling, the forever-pending import() after a withdrawn termination, and test runtime; this note records the re-entry and nested-walk paths that were examined and found consistent.
|
No actionable comments were generated in the recent review. ℹ️ Recent review info
WalkthroughThe change adds a termination-specific path to module evaluation when Bun additions are enabled. A new stress test checks interrupted dynamic imports, module graphs, deferred namespace reads, nested evaluations, and top-level await. ChangesModule termination handling
Priority: Merge Risk:
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | The description follows the WebKit template in spirit. It has a bug-style title, a Problem and Fix explanation, and a Verified section. It includes a detailed Notes section with reproduction steps, te… | Add a Bugzilla bug link (https://bugs.webkit.org/show_bug.cgi?id=#####) and a bug title that matches the template. Replace the draft framing with a concise Explanation of why the change fixes the bug. Add the changed-file list in the templa… |

Passed checks: 3 passed
-
Full details: Title check
-
Explanation
The title names the main behavior change: a module stopped by a termination records null and its capability is rejected with null. It matches the changeset, which changes CyclicModuleRecord::evaluate() and the aot/runtime copy so stopped modules store null and reject with null. The title is specific and concise, and it has the [JSC] component prefix. It is 89 characters, which is long, but it stays a single clear sentence.
-
Full details: Description check
-
Explanation
The description follows the WebKit template in spirit. It has a bug-style title, a Problem and Fix explanation, and a Verified section. It includes a detailed Notes section with reproduction steps, test results, and measurements. However, it lacks the template's required elements: no Bugzilla bug link (the author says no bug was filed), no 'Reviewed by' line, and no changed-file list with function names (for example, '* runtime/CyclicModuleRecord.cpp: (CyclicModuleRecord::evaluate)'). The description is also a draft with open questions, and it is very long, which makes the key information hard to find.
Resolution
Add a Bugzilla bug link (https://bugs.webkit.org/show_bug.cgi?id=#####) and a bug title that matches the template. Replace the draft framing with a concise Explanation of why the change fixes the bug. Add the changed-file list in the template format, naming the modified files and functions (for example, runtime/CyclicModuleRecord.cpp: (CyclicModuleRecord::evaluate), (CyclicModuleRecord::setEvaluationError), and aot/runtime/AOTModuleEvaluation.cpp: (Modules::evaluateWithOwnStack)). Remove or move the long Notes content out of the commit-message body, and resolve or remove the two open questions before marking the PR ready for review. Include the reviewer line once a reviewer is assigned.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Preview build of b7a7dba: |
|
Status How to reproduce on
With this PR ( The PR is a draft. It waits for a maintainer's answer to the two questions at the top of the description. The tests for Bun are on the branch |
b2bb0cd to
05b90bb
Compare
|
I am moving this PR to draft. I do not know that it is wrong, but I cannot vouch for it against 1. The evidence in this PR is older than 2. #927 lets
The stress test has no case where the same record is entered twice, and Questions, for whoever knows #927:
I will rebase and add the test in Bun when I have an answer, or sooner if the answer is clear from the code. |
|
Two more findings for this draft. I have not pushed anything. 1. The first question above is mostly answered by the code. I read
2. The stress test depends on a loop that spins, and that is not safe. Each module body of the test is
What I will do, in one push, so that CI runs once: rebase onto |
… error of the modules it stops Step 9 of CyclicModuleRecord::evaluate() stored the value of whatever unwound InnerModuleEvaluation as the error of every module on the stack. For a termination that value is the string "JavaScript execution terminated.". An embedder can withdraw a termination (VM::cancelTermination) and run script again. A later import() of such a module then rejected with that string. Step 9 now records null for a termination, as V8 does. The module also does not keep the capability, which the termination cannot reject, so the next Evaluate() of that module makes a rejected one. Before, the next Evaluate() returned the pending capability. A second read of a deferred namespace then failed ASSERT(promise->status() != JSPromise::Status::Pending) in AbstractModuleRecord::evaluateSync, and returned a binding of the module in a build without assertions.
05b90bb to
6316bdb
Compare
|
I pushed 6316bdb. It is the one push that my last comment describes. The PR stays a draft until I have run the build of this head. What changed.
What I ran, with the test files of this push, on Linux x64:
That head has the arm with the two assertions, on 40b30d2. No build has the arm of this push yet. I also forced each branch of the loop of the test in its first turn, with a trace of the turns:
A correction. The description and the status comment said "11 of 34 checks". The test has 29 checks, and I counted them in a run this time. The status comment has the right number now. One answer to my second question, from reading only. Not done yet.
|
The module that a run stops waits in Atomics.wait for longer than the run has. The run wakes that wait and stops the body in it, so no loop has to be stopped while it spins. An attempt whose wait ends by itself is made again. Three scenarios enter a module record again while it is evaluating: a module that calls require() of itself, the same module behind an importer, and a require() cycle. These tests need the engine change of oven-sh/WebKit#866.
…ing termination A program that is compiled ahead of time has its own module evaluation (aot/runtime). It stores the value of the exception as the error of a module in five places that step 9 of CyclicModuleRecord::evaluate() does not see. So such a program still got the string "JavaScript execution terminated." as the error of a module that a withdrawn termination had stopped. Every store of the error of a module goes through CyclicModuleRecord::setEvaluationError(). It now stores null when the value is the value of the termination that is pending. Step 9 keeps what the writer cannot do: it drops the capability and returns with the termination pending. The loop of step 9.a is the loop of the specification again. The new test of testaot stops the body of a compiled module in four of the five places.
|
I pushed b39f654 on top of 6316bdb. It changes where the fix is. The PR stays a draft until the build of this head has run. Why. The first version fixed step 9 of What changed.
What I know, and how.
Next. When CI has built this head: the stress test and the new test on its shells, the sizes of the four lto lanes, and a Bun built with it (the plain program and the |
For a termination, step 9 of CyclicModuleRecord::evaluate() dropped the capability of the module. An import() that had joined the evaluation then waited for a promise that nothing settled. Modules::evaluateWithOwnStack kept the capability, so a compiled program and a plain program did not end the same way. Both places now reject the capability with null, as handled, and leave the termination pending. The module keeps the rejected capability, as a module that threw does. The stress test has a scenario with an import() that joins the evaluation. The test of testaot has two more programs. One drops the error of a CommonJS file while the termination is pending, which the second condition of the guard in setEvaluationError() must leave alone. The other has import() calls that join the evaluation. Where a compiled program and plain Bun do not end the same way, the test says only that the value of the termination did not come out.
|
I pushed b7a7dba after a self-review of the last head. The review had 3 concerns about the code, and this push has a change for each. The PR stays a draft: no build has this head yet, and two questions are for maintainers (below). What changed.
What I know about this head. Not changed, by decision. The review also asked for these, and they are not in the diff:
Questions for maintainers. The description will start with them when I rewrite it for this head.
|
|
This draft needs two decisions from maintainers before it can go further. CI is green on b7a7dba, both new tests pass on the builds of that head, and the description is current for it.
About #443, which closed as "this is working around a bun bug": this defect needs no Bun code. The The description also lists eight cases that this PR does not fix. This account cannot open an issue for them. Two corrections to my comment of Oct 29, 14:13 UTC. The |
Problem
VM::cancelTermination,node:vm'stimeout), a module that it stopped has the termination's value as its error. A laterimport()rejects with the string"JavaScript execution terminated.".CyclicModuleRecord::evaluate()and five inaot/runtime. All end insetEvaluationError.import()made during the evaluation never settles. Debug builds:ASSERTION FAILED: promise->status() != JSPromise::Status::Pending(AbstractModuleRecord.cpp:1568).Fix
setEvaluationErrorstoresnullfor the value of a pending termination.aot/runtimereject the capability withnull, as handled.null(Module::RecordError), and Node v26.3.0 rejects theseimport()calls withnull.JSTests/stress/module-evaluation-cut-short-by-termination.jsandtestaot'smodule-programs/termination-in-module-body. Both fail onmain.Background
aot/evaluates the modules ofbun build --compile --aotprograms.import()stayed pending.Downsides
import()now rejects. With no handler, Bun printserror: nulland exits with 1, as Node does.Notes
All line numbers are for the head of this PR, b7a7dba, which is
mainf495db1 and this change. Each measurement has its date and its builds.runtime/CyclicModuleRecord.cpphas +16 -1,aot/runtime/AOTModuleEvaluation.cpphas +7 -2, and the rest is tests.Question 1: the value. This PR stores
null, as V8 and Node do. Merged code has two other answers for a module that a termination stops:main, avm.SourceTextModulethat its own run stopped hasERR_SCRIPT_EXECUTION_TIMEOUTas its error (Worker teardown, round 3: node:vm timeout on TerminationDeadline; take-at-landing termination; exit/streams/serve/valkey/Bun.build fixes bun#38660). Question 2 of node:vm: module.evaluate() runs one Evaluate() of the module record bun#46004 asks whether to keep that fornode:vmmodules.AOTModuleLinking.cpp:530does not fail a module for a termination.Is
nullright for a module of the program's own loader? If the answer is the error of the run, the guard in the writer is the place to mark the module (one bit) in place ofnull. The embedder that withdraws the termination then gives the module its error, and rejects the capability with it.Question 2: the edit in
aot/runtime.Modules::evaluateWithOwnStackhas a copy of step 9. This PR changes it (AOTModuleEvaluation.cpp:2063, +7 -2): for a termination it rejects the capability withnull, where it kept it pending. Without that edit, a plain program and a program frombun build --compile --aotdo not end the same way for animport()made while the root evaluated: rejected withnullin the plain program, pending in the compiled one. Onmainboth are pending. If this file must not change here, I take the edit out and this description says what stays different.About #443. #443 (closed, not merged) added a return for a termination in front of step 9.d. Its subject was an assertion in terminated workers (
ASSERTION FAILED: exception, inJSPromise::rejectWithCaughtException). It left the state of the modules as it was, and it closed with "this is working around a bun bug". This PR is about that state: the error that a stopped module keeps, and its capability. It is not a workaround of Bun code.main'sjscshows the defect with--watchdogand two files (see "Upstream"), and with$vm.callWithTimeLimit, which #440 added. #440 says what a withdrawal is for: "take the request back so nothing of it reaches whatever the same VM entry runs next". The error of a stopped module is a thing that reaches it.No report from a user. The defect was found in the work on oven-sh/bun#46004, which lists it under "Not fixed". In Bun it needs a
node:vmtimeoutorbreakOnSigintaround a synchronous evaluation: arequire()of an ES module, the first read of animport defernamespace, orevaluate()of avm.SourceTextModule. oven-sh/bun#30598 (bun test --timeout) and oven-sh/bun#33411 (Ctrl+C in the REPL) would add two more.--aotis in no stable release: oven-sh/bun#45631 merged on Oct 27, after v1.4.4.Where the value was stored.
m_evaluationErrorhas one write, insetEvaluationError(CyclicModuleRecord.cpp:540). Six places give it the value of an exception with no test for a termination:evaluate()(CyclicModuleRecord.cpp:652).aot/runtime/AOTModuleEvaluation.cpp, throughModules::setFailed(AOTModules.cpp:303):Modules::innerModuleEvaluation(:465),Modules::callBodyUnderOwnMark(:541and:545) andModules::evaluateCommonJS(:2587).Modules::evaluateWithOwnStack(AOTModuleEvaluation.cpp:2059), which has the same loop as step 9.A seventh place is
JSModuleLoader.cpp:487, after a failed link. Its one caller inSource/JavaScriptCoreisJSC::linkAndEvaluateModule(Completion.cpp:307), which neither Bun norjsc.cppcalls.AOTModuleLinking.cpp:530already tests for a termination before its store.The three heads of this PR.
bun build --compile --aotstill printed the string. So the fix moved to the writer.import()made while the module evaluated holds that promise, and it stayed pending.aot/runtimekept its capability, so the two modes did not end the same way.null.Other places for the fix that I considered. A helper at each store that maps an exception to the error to record: each of the six stores is then an edit, five of them in
aot/runtime, and a new store can forget it. Anullvalue for the termination exception of the VM: that changes what every reader of that value gets, not only the module code, and the stores still record a termination. A rejection insideJSPromise::rejectWithCaughtException: it has 33 call sites in the loader. Most of them settle a promise of the load phase, and merged code says that a termination is not a failure of a load (JSModuleLoader.cpp:841).The guard (
CyclicModuleRecord.cpp:537) has two conditions. V8 has the same mapping in its one writer:Module::RecordErrorstoresnullfor an exception that script cannot catch (deps/v8/src/objects/module.cc:118-123in Node v26.3.0).VM::hasPendingTerminationException). Each store above runs while the termination unwinds.Modules::dropErrorOfFile,AOTModuleEvaluation.cpp:1993). A value that script throws is never changed: no script runs while a termination is pending.One store is outside the reach of this key:
operationAOTAbandonModuleEvaluation(AOTModules.cpp:1927) runs inside aDeferTerminationForAWhilescope (:1926), where the termination is not pending. By my reading no termination reaches it: a handler of compiled code calls it, and the unwinder enters no handler for a termination (AOTUnwinding.cpp:197, and the assertion atAOTExceptionOperations.cpp:176). I did not make a test for that.The capability (
CyclicModuleRecord.cpp:658). Step 9.d cannot reject it for a termination:JSPromise::rejectWithCaughtExceptiondoes nothing then (JSPromise.cpp:262). A module that keeps the pending promise gives it to each later Evaluate(). In a build without assertions, the second read of a deferred namespace then returned1for a binding that the body had set, and aReferenceErrorfor one that it had not.rejectAsHandled(vm, jsNull())and leaves the termination pending. With the handled flag, the rejection tracker of the embedder is not called while the termination is pending. The reactions of the capability are jobs, which run after the withdrawal.import()is another promise. The rejection reaches it as usual, so with no handler it is an unhandled rejection.import()made while the module evaluated withnull(see "Bun").mainlets a record that is EVALUATING be evaluated again (require()of an ES module from inside its own evaluation). InnerModuleEvaluation returns at once for such a record (AbstractModuleRecord.cpp:1929), so its stack is empty and nothing is stored. The walk that owns the record stores the error when the termination reaches its own step 9.Return value. For a termination,
evaluate()returnsnullptrwith the termination pending. Before this change it returned the capability. I read each caller of the promise-returning Evaluate() outsideaot/. Each one tests the exception before it uses the promise:JSMicrotask.cpp:1545,:1664and:1701.AbstractModuleRecord.cpp:1565(evaluateSync) and:1720(evaluateModuleSync).JSModuleLoader.cpp:491.NodeVMModule.cpp:160in Bun, the only caller insrc/jsc/bindings.AbstractModuleRecord::evaluate'swrapreturnsnullptrfor an empty value (AbstractModuleRecord.cpp:1676). Inaot/,Modules::evaluatereturns the result ofrecord->evaluate()to its own caller (AOTModuleEvaluation.cpp:2096). I did not follow that caller.The state is not new. A module body that runs
throw nullleaves the same state: status EVALUATED, the errornull, and a capability that is rejected withnull. The readers of the error test for an empty value, andnullis not empty.What a program sees, with the same two files under each runtime:
{"stopped":"ERR_SCRIPT_EXECUTION_TIMEOUT","started":true,"later":"rejected","typeofError":"string","error":"JavaScript execution terminated."}{"stopped":"ERR_SCRIPT_EXECUTION_TIMEOUT","started":true,"later":"rejected","typeofError":"object","error":"null"}The module waits and does not spin, so the program ends on each runtime. With a timeout that passes before the module body starts (1 ms), Bun prints
"started":false,"later":"fulfilled"with and without this change: the run stopped the load, and Evaluate() did not run.The stress test.
$vm.callWithTimeLimitarmsVM::addTerminationDeadlineand withdraws the termination, likenode:vm. Six scenarios, 34 checks:import()that a job evaluates inside the limited call, thenimport()of the module twice and of a module that imports it.import defernamespace inside the limited call (EvaluateModuleSync).awaitthat is stopped before its firstawait.import()of its own module and lets that job run. The evaluation is the first read of a deferred namespace. Theimport()must reject withnull.The module body to stop waits in
Atomics.waitfor 1 s longer than the limit. The termination wakes that wait and is thrown from it (WaiterListManager::waitSyncImpl), so no loop has to be stopped while it spins. The test takes about 80 ms in the ltojsc.A limit can pass before the body starts, on a slow or a busy machine. A wait can also end by itself, and the body logs that. The test sees both in its log and takes the next turn with a longer limit (10 ms, then 4 times the last one) and new module records (a specifier with one more
/is another URL of the same file). Two turns with a wait that ended fail the scenario, so a limit that does not stop the body fails the test in about 2 s for each scenario. On the second head I forced each branch of that loop in its first turn and read a trace of the turns. The loop did not change since.The
import()whose own evaluation job the limit stopped stays pending, before and after this change (see "Not fixed"). Scenario 1 pins that state.The test of
testaot.module-programs/termination-in-module-body(aot/tests/AOTModuleProgramTests.cpp:900) compiles four programs and runs each in the shell. The script stops a module body withrequestTerminationAndCallinsidecallAndCancelTermination, so there is no timer.termination-during-import-handoff: a laterimport()of the stopped module rejects withnull.require()of a module, and two modules that import each other: each laterimport()rejects withnull.require()of the file returns, as onmain. This program fails if the guard loses its second condition. I checked that on the second head with a breakpoint ingdbthat gives the writer the value of the termination for each store: the tworequire()lines change fromreturnedtothrew null.import()calls of a root whilerequire()evaluates it, one from a module that it requires and one from its own body: both reject withnull, and so does a later one.A trace of the callers of the writer (a breakpoint in the assertions-aot shell of this head, Oct 29) shows these stores in the four programs:
innerModuleEvaluation(:465),callBodyUnderOwnMark(:541and:545),evaluateWithOwnStack(:2059), and the clear indropErrorOfFile. No program reaches the store ofevaluateCommonJS(:2587).Four lines of the expected output say only
not the value of the termination. For those steps a compiled program and plain Bun do not end the same way today, and this test must not pin what only a compiled program does. They are a secondrequire()of a stopped module (two programs) and animport()of a module that imports a stopped CommonJS file (two programs).Results, on Oct 29, Linux x64, with the builds of this head (
autobuild-preview-pr-866-b7a7dba4), of the second head (autobuild-preview-pr-866-b39f654a) and ofmain(autobuild-f495db1d248886d7de1077d0abe3a604694ebb4c):mainjscimport()of scenario 6 is pendingASSERTION FAILED: promise->status() != JSPromise::Status::Pending,AbstractModuleRecord.cpp(1568)--validateExceptionChecks=true. ASAN debug: the sametestaottest of this head, with thejscoflater import of first.js: rejected with stringimport()calls of program 4 arependingmodule-programstests passCI passed on this head: 84 checks, with the six test jobs (Linux x64 and arm64: lto, lto-aot, lto-hardened-aot). They run
run-javascriptcore-tests, andtestaoton the aot lanes.Cost. Measured on Oct 29 with the lto
jscofmain(f495db1) and of this head..textofjsc(llvm-size -A): amd64-lto -288 B, amd64-lto-aot -512 B, arm64-lto 0 B, arm64-lto-aot -704 B.NEVER_INLINE. Each of its callers is on a failure path. Without the attribute the guard is in each inlined copy. With it,evaluate()goes from 1,232 to 971 bytes andasyncExecutionRejectedfrom 743 to 368 (amd64-lto), and the writer is one function of 351 bytes. In amd64-lto-aot,evaluateWithOwnStackgoes from 654 to 713 bytes..data,.bssand.data.rel.roare equal..rodatais 12,800 bytes smaller in each of the four lanes, and 12,784 of them are in the ICU data at its start. That data differs from one build of CI to the next. I did not find what the other 16 bytes are.gdb, instructions insideevaluate(), amd64-lto): 89 to 86 for an empty module, 77 to 76 for a module withawait 0.evaluate()and the writer together: 125 to 149 for a module withthrow 1(one record), 173 to 212 for a root whose third import throws (two records). The call of the writer is out of line now.sizeof(JSModuleRecord)andsizeof(VM)stay as they are.What changes for a user, other than the value.
import()made while the module evaluated, with no handler: it was pending for good, and it now rejects withnull. Bun then printserror: nulland exits with 1. Node v26.3.0 ends the same program withERR_UNHANDLED_REJECTIONand the reasonnull.import()that was in flight when avmrun required the same module and was stopped: the same. This shape is Bun's only: in Node thatrequire()throwsERR_REQUIRE_ESM_RACE_CONDITION.jsc --watchdog=300 --watchdog-exception-ok -m spin.mjs importer.mjs, where the watchdog stopsspin.mjsandimporter.mjsimports it. It exits with 0 onmainand with 3 (Exception: null) now: the shell knows a termination by its value (jsc.cpp:4408). With one file the exit code is 0 as before. The test jobs of CI pass, so no test ofJSTestsneeds that flow.Not fixed, with what I saw.
import(). A termination that stops a module thatrequire()evaluates reaches no store there: a breakpoint counts 0 calls of the writer, and a secondrequire()returns (a program of two modules in the lto-aot shells ofmainand of this head). All four programs of thetestaottest hold animport(), so they do not show it.vmtimeout that passes during the load, the laterimport()of the root stays pending (Bun 1.4.3, and Bun with this change). A debug build of Bun can also stop there, atASSERTION FAILED: mapEntry->status() != ModuleRegistryEntry::Status::New(JSModuleLoader.cpp:869). The capability is one of five promises that the loader keeps on a record or on a registry entry (m_topLevelCapability,m_asyncCapability,m_fetchPromise,m_modulePromise,m_loadPromise).rejectWithCaughtExceptionleaves each of them pending for a termination. This PR settles the first, at step 9.import()whose own evaluation job the termination stopped stays pending (JSMicrotask.cpp:1669is that call). Scenario 1 of the stress test pins it.awaitthat is stopped after its firstawait(JSMicrotask.cpp:1073). Itsimport(), a laterimport()and animport()of a module that imports it all stay pending, onmainand on this head (lto and assertions-aot shells, Oct 29).AsyncModuleExecutionFulfilled12.b and 12.c (theTRY_CLEAR_EXCEPTIONatCyclicModuleRecord.cpp:940and:950): by the text it returns for a termination beforeasyncExecutionRejectedruns. I did not run that case. v8/v8@e7292baec0 is V8's change for this exit.import()of the importer stays pending, with and without this change. Node v26.3.0 fulfils it: the importer ran withundefinedfor the default export.require()of the stopped module returns an empty object. Node throwsERR_REQUIRE_CYCLE_MODULE, and a compiled program throwsnull. The object is in Bun's own map of required modules, which the engine does not see.JSModuleLoader.cpp:485stores the value in the registry entry, which the writer does not see. No test can reach it (see "Where the value was stored").There is no issue for these. This account cannot open one.
Upstream. Upstream's
main(1b03d89) has the same store and the same rejection with no test for a termination (CyclicModuleRecord.cpp:414and:421). The shell shows the defect with upstream's own flags:That is
main'sjsc. With this change the last line islater import rejected with null. The change is behindUSE(BUN_JSC_ADDITIONS)because upstream's shell reads the value of the termination as its marker (see the shell item above). I did not file a bug at bugs.webkit.org.Other open PRs on these lines. #845 edits the body of
setEvaluationError, and draft #871 changesevaluate()around step 9. #934 changesaot/. The one that lands second can have a conflict in the text.The base is f495db1, and
mainin this description is that commit.mainis now 8c6c963. It has three merges more (#919, #936, #937), and none of them changes a file of this PR. CI built this head on its own base, not on a merge withmain. I rebase when the two questions have an answer.Bun. Bun's
mainpins 8c6c963 since oven-sh/bun#47129. My debug build of Oct 29 is an earlier commit of the branch of that PR, 6e63b62277, which pins f495db1. It has oven-sh/bun#46319 and the tests branch merged in, and--webkit-version=autobuild-preview-pr-866-b7a7dba4."typeofError":"object","error":"null"(3 of 3).bun build --compile --aot, print the same line (3 of 3). With the first head, that program printed the string.await, a root with top-levelawait, and two modules that import each other. Plain and--aotprint the same lines, withnullfor each laterimport().require()evaluates. A module that it requires callsimport()of the root, and the root callsimport()of itself. Both calls reject withnull, plain and--aot. With the second head, the Bun test had the first pending and the secondnull, and program 4 of thetestaottest had both pending. The one line that still differs between the two modes is the secondrequire()of the root (item 7 above).node:vmentry point, withtimeoutand withbreakOnSigint. The modules to stop wait inAtomics.wait. Its 3 tests pass (3 runs). With Bun 1.4.3 all 3 fail: the laterimport()rejects with the string. On a debug build of Bun'smaintheimport deferscenario stops at the assertion above.require()of itself, the same module behind an importer, and arequire()cycle. One scenario has the twoimport()calls of the third program. Eachimport()rejects withnull, and no assertion fails.The tests for Bun are on the branch
robobun/6243fcc3/vm-plain-module-stoppedof oven-sh/bun (2584cafc76). They go in with the change ofWEBKIT_VERSIONthat has this PR, and a program fortest/aot/programsbelongs with them.oven-sh/bun#46319 keeps the same string out of
mock.resultsandModule._extensionshandlers and needs no engine change.Self-review. 3 concerns raised, 2 addressed: the capability is rejected and not dropped, in both evaluators, and program 3 of the
testaottest covers the second condition of the guard. The third asks for a tracking issue for the list above, which this account cannot open.