Floating point division is now relying on underlying FPU and IEEE for behavior with respect to divide by 0
Showing the changes to src/vm/module_reader.cpp (1 of 11 files). Show all
Unified · Split
| @@ -362,10 +362,7 @@ namespace · 361 unmodified lines | ||
| 362 | 362 | { |
| 363 | 363 | auto vm_module_type = modobj.type_section[module_constants::vm_module_type_desc_number]; |
| 364 | 364 | if (vm_module_type->size_in_bytes != modobj.header.data_size) throw module_reader_exception{ "Invalid type desc for MP" }; |
| 365 | − | |
| 366 | − // [SPEC] The Dis VM spec does not guarantee the MP segment (i.e. data segment) of the loaded | |
| 367 | − // module will be initialized to zero, but it is the C/C++ approach so defer to that. | |
| 368 | − modobj.original_mp.reset(vm_alloc_t::allocate(vm_module_type, vm_alloc_t::zero_memory)); | |
| 365 | + modobj.original_mp.reset(vm_alloc_t::allocate(vm_module_type)); | |
| 369 | 366 | } |
| 370 | 367 | |
| 371 | 368 | auto array_stack = std::array<byte_t *, module_constants::array_address_stack_size>{}; |