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

Fix some check issues on table operations #2392

Merged
merged 3 commits into from
Jul 27, 2023

Conversation

wenyongh
Copy link
Contributor

Fix some check issues on table.init, table.fill and table.copy, and unify the check method
for all running modes.
Fix issue #2390 and #2096.

Copy link
Collaborator

@yamt yamt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

i guess it's better to have a function or a macro like the following
rather than repeating the mostly same logic.

bool limit_check(uint32 off, uint32 len, uint32 lim);

@wenyongh
Copy link
Contributor Author

lgtm.

i guess it's better to have a function or a macro like the following rather than repeating the mostly same logic.

bool limit_check(uint32 off, uint32 len, uint32 lim);

Good point, thanks, I defined an inline function offset_len_out_of_bounds to refine the code.

Copy link
Collaborator

@yamt yamt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@wenyongh wenyongh merged commit 59b2099 into bytecodealliance:main Jul 27, 2023
368 checks passed
@wenyongh wenyongh deleted the fix_table_checks branch August 1, 2023 11:15
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Fix some check issues on table.init, table.fill and table.copy, and unify the check method
for all running modes.
Fix issue bytecodealliance#2390 and bytecodealliance#2096.
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

Successfully merging this pull request may close these issues.

None yet

2 participants