threads icon indicating copy to clipboard operation
threads copied to clipboard

Remove duplicate (broken) definition of `assert_ArrayBuffer`

Open backes opened this issue 3 months ago • 10 comments

This was removed from the upstream test in https://github.com/WebAssembly/spec/commit/cc2d59bd56e5342e3c1834a7699915f8b67fc29c.

The assert_ArrayBuffer helper is now defined in the assertions.js file. The version there does not have the problem with self.

This problem was uncovered when importing the threads JS tests into V8, see https://crbug.com/449581914.

backes avatar Oct 06 '25 12:10 backes

Alternatively to this targeted fix we could "just" rebase this repository, I guess...

backes avatar Oct 06 '25 12:10 backes

@backes is this fix already present in the https://github.com/WebAssembly/threads/tree/upstream-rebuild of this repository? That branch contains a rebase. If so, I should probably rename that branch to "main", which I've intended to do for a while but never got around to.

conrad-watt avatar Oct 06 '25 15:10 conrad-watt

Ah, I wasn't aware of that branch. Yes, indeed, all tests pass on that branch. Great!

But that made me notice that the threads proposal does not seem to add any JS-API tests. Can that be true, or do I miss anything?

How I noticed: In V8 when we import tests from proposals, we skip tests that are either identical to the main spec test, or unchanged since the branch of the proposal (determined by looking at the git merge-base). With these checks, we didn't add any tests from the threads proposal.

backes avatar Oct 07 '25 08:10 backes

But that made me notice that the threads proposal does not seem to add any JS-API tests. Can that be true, or do I miss anything?

Currently these parts of the spec are mainly exercised by the extraction of the Wast tests to the JS harness, enabled by https://github.com/WebAssembly/threads/pull/229 in the upstream-rebuild branch. We should write some manual JS API tests.

conrad-watt avatar Oct 09 '25 11:10 conrad-watt

Oh, nice, so after #229 we can even import the spec tests into V8! That would be awesome.

But yes, we should definitely add a few JS API tests to catch stuff like #234.

backes avatar Oct 09 '25 11:10 backes

So is anything blocking the upstream-rebuild branch from becoming main? If no, then I would wait for that to happen, and then we can import the updated tests into V8. If yes, then we might consider switching to the rebuild-upstream branch for now, and importing the tests from there.

backes avatar Oct 09 '25 11:10 backes

My plan is to do this rename tomorrow after the threads portion of the CG meeting, unless the presentation reveals any unexpected complications.

conrad-watt avatar Oct 27 '25 13:10 conrad-watt

Done here https://github.com/WebAssembly/threads/issues/237

conrad-watt avatar Oct 29 '25 05:10 conrad-watt

Thanks!

I tried importing that new main branch now, and as expected this does not import any JS tests (because the proposal does not define any).

Trying to import the core tests (after #229 added support for translating the thread construct to JS) leads to multiple errors, see https://github.com/WebAssembly/threads/pull/229#issuecomment-3467733009. I am not sure if those tests were ever run in a JS shell. It's very possible that I am doing something wrong there.

backes avatar Oct 30 '25 12:10 backes

I think most of the testing was done in the browser rather than through a headless shell, so there may be some quirks to iron out. I'll keep most of the follow-ups in the other issue.

conrad-watt avatar Oct 30 '25 12:10 conrad-watt