Comments (16)
Yes, how about increasing it to 2048 for linux platform?
BTW, the size of argv_buf in wasm_runtime_invoke_native seems too large and unnecessary since normally the parameter count of wasm function and host function won't be very large:
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c
Lines 4883 to 4884 in 30426be
How about we also decreasing it, e.g. uint64 argv_buf[12]
?
from wasm-micro-runtime.
Yes, how about increasing it to 2048 for linux platform?
sure, it's the simplest solution.
BTW, the size of argv_buf in wasm_runtime_invoke_native seems too large and unnecessary since normally the parameter count of wasm function and host function won't be very large:
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c
Lines 4883 to 4884 in 30426be
How about we also decreasing it, e.g.
uint64 argv_buf[12]
?
it makes sense to decrease it.
what's your rationale for 12?
from wasm-micro-runtime.
btw, i want to group these issues with a label, say, "native stack overflow detection".
can you give me necessary permissions?
ditto for exception-handling.
from wasm-micro-runtime.
btw, i want to group these issues with a label, say, "native stack overflow detection". can you give me necessary permissions?
ditto for exception-handling.
OK, done, please have a try.
from wasm-micro-runtime.
btw, i want to group these issues with a label, say, "native stack overflow detection". can you give me necessary permissions?
ditto for exception-handling.OK, done, please have a try.
i can assign existing labels. but i can't create new labels.
from wasm-micro-runtime.
btw, i want to group these issues with a label, say, "native stack overflow detection". can you give me necessary permissions?
ditto for exception-handling.OK, done, please have a try.
i can assign existing labels. but i can't create new labels.
I just assigned you with Triage role, creating the new label requires Write role, we need to discuss it internally. Shall I create the "native stack overflow detection" and "exception handling" labels for you first?
from wasm-micro-runtime.
btw, i want to group these issues with a label, say, "native stack overflow detection". can you give me necessary permissions?
ditto for exception-handling.OK, done, please have a try.
i can assign existing labels. but i can't create new labels.
I just assigned you with Triage role, creating the new label requires Write role, we need to discuss it internally. Shall I create the "native stack overflow detection" and "exception handling" labels for you first?
yes. it's enough.
from wasm-micro-runtime.
Yes, how about increasing it to 2048 for linux platform?
sure, it's the simplest solution.
BTW, the size of argv_buf in wasm_runtime_invoke_native seems too large and unnecessary since normally the parameter count of wasm function and host function won't be very large:
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c
Lines 4883 to 4884 in 30426be
How about we also decreasing it, e.g.
uint64 argv_buf[12]
?it makes sense to decrease it. what's your rationale for 12?
In current libc-wasi, it seems that API wasi_path_open has the maximum argument count: 9 arguments + 1 exec_env = 10, I suppose 12 is big enough for most cases. Or any suggestion from you?
from wasm-micro-runtime.
btw, i want to group these issues with a label, say, "native stack overflow detection". can you give me necessary permissions?
ditto for exception-handling.OK, done, please have a try.
i can assign existing labels. but i can't create new labels.
I just assigned you with Triage role, creating the new label requires Write role, we need to discuss it internally. Shall I create the "native stack overflow detection" and "exception handling" labels for you first?
yes. it's enough.
Done, the two labels were created.
from wasm-micro-runtime.
btw, i want to group these issues with a label, say, "native stack overflow detection". can you give me necessary permissions?
ditto for exception-handling.OK, done, please have a try.
i can assign existing labels. but i can't create new labels.
I just assigned you with Triage role, creating the new label requires Write role, we need to discuss it internally. Shall I create the "native stack overflow detection" and "exception handling" labels for you first?
yes. it's enough.
Done, the two labels were created.
thank you.
from wasm-micro-runtime.
Yes, how about increasing it to 2048 for linux platform?
sure, it's the simplest solution.
BTW, the size of argv_buf in wasm_runtime_invoke_native seems too large and unnecessary since normally the parameter count of wasm function and host function won't be very large:
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c
Lines 4883 to 4884 in 30426be
How about we also decreasing it, e.g.
uint64 argv_buf[12]
?it makes sense to decrease it. what's your rationale for 12?
In current libc-wasi, it seems that API wasi_path_open has the maximum argument count: 9 arguments + 1 exec_env = 10, I suppose 12 is big enough for most cases. Or any suggestion from you?
well, the principle "whatever largest commonly-used api needs" sounds reasonable to me.
however, the actual value seems a bit more larger than that:
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c
Lines 4910 to 4915 in d39d2ba
from wasm-micro-runtime.
Yes, how about increasing it to 2048 for linux platform?
sure, it's the simplest solution.
probably 2048 is not enough as
aot_call_indirect + invoke_native_with_hw_bound_check + wasm_runtime_invoke_native
seems to consume about 1000 bytes. (macOS amd64)
how about 3KB?
from wasm-micro-runtime.
Yes, how about increasing it to 2048 for linux platform?
sure, it's the simplest solution.
BTW, the size of argv_buf in wasm_runtime_invoke_native seems too large and unnecessary since normally the parameter count of wasm function and host function won't be very large:
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c
Lines 4883 to 4884 in 30426be
How about we also decreasing it, e.g.
uint64 argv_buf[12]
?it makes sense to decrease it. what's your rationale for 12?
In current libc-wasi, it seems that API wasi_path_open has the maximum argument count: 9 arguments + 1 exec_env = 10, I suppose 12 is big enough for most cases. Or any suggestion from you?
well, the principle "whatever largest commonly-used api needs" sounds reasonable to me.
however, the actual value seems a bit more larger than that:
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c
Lines 4910 to 4915 in d39d2ba
Oh, that's really upsetting, suppose MAX_REG_FLOATS is 8 and SIMD is enabled, allocation will occur when the native API has 8 arguments: 1 + 8 * 2 + 8 * 2= 33 > 32. Maybe we had better keep 32 unchanged.
from wasm-micro-runtime.
Yes, how about increasing it to 2048 for linux platform?
sure, it's the simplest solution.
probably 2048 is not enough as aot_call_indirect + invoke_native_with_hw_bound_check + wasm_runtime_invoke_native seems to consume about 1000 bytes. (macOS amd64) how about 3KB?
It sounds good to me.
from wasm-micro-runtime.
BTW, we are planning to release WAMR-2.0.0 since we haven't released a new version for some time and also there are some developers asking for the new release, is it ok to create the release before your enhancement PR for native stack overflow check is finished? Maybe we can add it in the release 2.0.1.
from wasm-micro-runtime.
BTW, we are planning to release WAMR-2.0.0 since we haven't released a new version for some time and also there are some developers asking for the new release, is it ok to create the release before your enhancement PR for native stack overflow check is finished? Maybe we can add it in the release 2.0.1.
#3325 might or might not involve abi breakage.
from wasm-micro-runtime.
Related Issues (20)
- per-host function override of native stack requirement HOT 7
- argv_buf on-stack array sizes might have a room to improve
- How to use coroutines in wasm? HOT 2
- Add ability to get import and export information from wasm_export interface HOT 2
- An unexpected behavior in multiple modes HOT 2
- Unexpected Execution HOT 2
- WAMR throw OOB exception in LLVM-JIT mode while not in Fast-JIT mode HOT 3
- Error occurs when calling native function with local variable in AOT mode? HOT 8
- Heap Buffer Overflow Inside "wasm_loader_check_br" Function HOT 3
- Out-of-Bound Memory Read inside "block_type_get_arity" Function HOT 3
- Error compiling wamr 2.0.0 for Windows. Error: invalid numeric argument '/Wextra' HOT 3
- On memory usage when loading a Wasm file with fast interpreter HOT 5
- wamrc size_level heuristic
- Exception: uninitialized element HOT 4
- Unexpected "type mismatch" Exception on JIT mode HOT 2
- macos CI runs failed HOT 2
- [RFC] Basic support for Multi-Memory proposal HOT 4
- Unexpected execution result on fast interpreter mode HOT 1
- Unexpected execution in fast interpreter mode HOT 2
- Unexpected execution result on fast interpreter mode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasm-micro-runtime.