Hi,

The test allocates 33 wasm memories, 10GB each. It can be that in such a
situation garbage collection of wasm memories does not work perfectly, and
eventually it cannot find memory anymore to allocate. The tests don't test
if you are
able to allocate a large number of wasm instances and wasm memories, this
is just a side effect.On real-world websites there are typically not so
many wasm memories, and they are used more and for longer so that the GC
can keep up with it.

Cheers, Andreas

On Wed, Oct 25, 2023 at 3:53 AM Liu Yu <li...@loongson.cn> wrote:

> Hi all,
>
> When porting the code pointer sandbox, I set the sandbox size on loong64
> to 256GB because some loongarch machines are configured with only 40-bit
> virtual address space for user space.
>
> However, after the port, I found that some wasm tests would fail, such as
>
>
>
>
>
>
>
>
>
> *=== wasm-spec-tests/memory_copy ===
> test/wasm-spec-tests/tests/memory_copy.js:74: RangeError:
> WebAssembly.Instance(): Out of memory: Cannot allocate Wasm memory for new
> instance  return new WebAssembly.Instance(module(bytes), imports);
>  ^RangeError: WebAssembly.Instance(): Out of memory: Cannot allocate Wasm
> memory for new instance    at instance
> (test/wasm-spec-tests/tests/memory_copy.js:74:10)    at
> test/wasm-spec-tests/tests/memory_copy.js:12772:11Command:
> out_dir/loong64.release/d8 --test test/wasm-spec-tests/tests/memory_copy.js
> --random-seed=967154330 --nohard-abort --testing-d8-test-runner--- FAILED
> ---*
>
> I changed the sandbox size  to 256GB on arm64 linux, and tests will also
> go wrong. It seems that the error is caused by insufficient memory in the
> sandbox.
>
> Tests like wasm-spec-tests/memory_copy and wasm-spec-tests/memory_init
> include many small wasm casts; Is the number of wasm instance also part of
> the test, or does it only need to be correct for each small instance? On 
> real-world
> websites, will there be an error due to insufficient memory because the
> sandbox is too small?
>
> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/e2051aee-c1ee-46a3-97a2-8442984cc384n%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/e2051aee-c1ee-46a3-97a2-8442984cc384n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

Andreas Haas

Software Engineer

ah...@google.com


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten
haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
dass die E-Mail an die falsche Person gesendet wurde.



This e-mail is confidential. If you received this communication by mistake,
please don't forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAELSTve1VR7-51nj2DOF27UOGRB_6G5Dhp4dJhHU6UW8k-3Okw%40mail.gmail.com.

Reply via email to