-
Notifications
You must be signed in to change notification settings - Fork 749
fix threads spec test issue #1586
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 threads spec test issue #1586
Conversation
| if (address + (wait64 ? 8 : 4) > aot_memory->memory_data_end.ptr) { | ||
| wasm_runtime_set_exception(module, "out of bounds memory access"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to compile on Windows, and should check address < memory_data:
if ((uint8 *)address < (uint8 *)aot_memory->memory_data.ptr
|| (uint8 *)address + (wait64 ? 8 : 4)
> (uint8 *)aot_memory->memory_data_end.ptr) {
wasm_runtime_set_exception(module, "out of bounds memory access");
return -1;
}| if ((uint8 *)address + (wait64 ? 8 : 4) | ||
| > module_inst->memories[0]->memory_data_end) { | ||
| wasm_runtime_set_exception(module, "out of bounds memory access"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also check whether address < memory_data:
if ((uint8 *)address < module_inst->memories[0]->memory_data
|| (uint8 *)address + (wait64 ? 8 : 4)
> module_inst->memories[0]->memory_data_end) {
wasm_runtime_set_exception(module, "out of bounds memory access");
return -1;
}| if ((uint8 *)address + 4 > module_inst->memories[0]->memory_data_end) { | ||
| wasm_runtime_set_exception(module, "out of bounds memory access"); | ||
| return -1; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((uint8 *)address < module_inst->memories[0]->memory_data
|| (uint8 *)address + 4
> module_inst->memories[0]->memory_data_end) {
wasm_runtime_set_exception(module, "out of bounds memory access");
return -1;
}| if (address + 4 > aot_memory->memory_data_end.ptr) { | ||
| wasm_runtime_set_exception(module, "out of bounds memory access"); | ||
| return -1; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((uint8 *)address < (uint8 *)aot_memory->memory_data.ptr
|| (uint8 *)address + 4
> (uint8 *)aot_memory->memory_data_end.ptr) {
wasm_runtime_set_exception(module, "out of bounds memory access");
return -1;
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks~
No description provided.