Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argv_buf on-stack array sizes might have a room to improve #3326

Open
yamt opened this issue Apr 17, 2024 · 0 comments
Open

argv_buf on-stack array sizes might have a room to improve #3326

yamt opened this issue Apr 17, 2024 · 0 comments

Comments

@yamt
Copy link
Collaborator

yamt commented Apr 17, 2024

we have the argv_buf on-stack array pattern in our code base.
the sizes of the arrays seem a bit arbitrary.

core/iwasm/common/wasm_c_api.c:    uint32 argv_buf[32] = { 0 }, *argv = argv_buf;
core/iwasm/common/wasm_runtime_common.c:    uint32 argc, argv_buf[16] = { 0 }, *argv = argv_buf, cell_num, module_type;
core/iwasm/common/wasm_runtime_common.c:    uint64 argv_buf[16] = { 0 }, *argv1 = argv_buf, *argv_dst, size, arg_i64;
core/iwasm/common/wasm_runtime_common.c:    uint32 argv_buf[32], *argv1 = argv_buf, *ints, *stacks, size;
core/iwasm/common/wasm_runtime_common.c:    uint32 argv_buf[32], *argv1 = argv_buf, argc1, i, j = 0;
core/iwasm/common/wasm_runtime_common.c:    uint64 argv_buf[32] = { 0 }, *argv1 = argv_buf, *ints, *stacks, size,

reference:
#3314 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant