Conversation
no1wudi
reviewed
Jun 26, 2024
core/iwasm/aot/aot_runtime.c
Outdated
| *p_native_addr = addr; | ||
| return (uint64)(addr - memory_inst->memory_data); | ||
| } | ||
| uintptr_t |
core/iwasm/aot/aot_runtime.c
Outdated
| return memory->memory_data + offset; | ||
| } | ||
| // execption | ||
| return 1; |
core/iwasm/aot/aot_runtime.h
Outdated
| AOTFunctionInstance * | ||
| aot_get_function_instance(AOTModuleInstance *module_inst, uint32_t func_idx); | ||
|
|
||
| uintptr_t |
| #endif | ||
| } | ||
|
|
||
| #if WASM_ENABLE_AOT_NATIVE_BOUNDS_CHECK == 0 |
| && !(is_local_of_aot_value | ||
| && aot_checked_addr_list_find(func_ctx, local_idx_of_aot_value, | ||
| offset, bytes))) { | ||
| #if WASM_ENABLE_AOT_NATIVE_BOUNDS_CHECK != 0 |
There was a problem hiding this comment.
Add a new param to wamrc to control this behavior
c2b3a21 to
1da0f59
Compare
Signed-off-by: wenlingyun1 <wenlingyun1@xiaomi.com>
7cd8b1a to
80e711b
Compare
no1wudi
reviewed
Jul 11, 2024
| { | ||
| LLVMValueRef param_values[3], value, maddr, func; | ||
| LLVMTypeRef param_types[3], ret_type = 0, func_type = 0, func_ptr_type = 0; | ||
| ; |
| return maddr; | ||
| } | ||
| } | ||
|
|
| goto fail; | ||
| } | ||
| } | ||
|
|
| LLVMBasicBlockRef incoming_blocks[] = { runtime_bounds_check, check_succ }; | ||
| LLVMAddIncoming(phi, incoming_values, incoming_blocks, 2); | ||
|
|
||
| return phi; |
There was a problem hiding this comment.
Don't use phi here? How about let aot_bounds_check return offset1 below?
Owner
Author
There was a problem hiding this comment.
Because we need to check whether the offset is out of bound during runtime, a phi node is needed to select the offset dynamically
Signed-off-by: wenlingyun1 <wenlingyun1@xiaomi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.