-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-VM-coreclros-browserBrowser variant of arch-wasmBrowser variant of arch-wasm
Milestone
Description
I compiled coreCLR for WASM with maybe? ASAN? flags and started getting "memory out of bounds".
I see memset or memcpy validating target pointer even when size is zero.
For example here when prevCapacity is 0 then from->ppOutBBs is -1.
runtime/src/coreclr/interpreter/compiler.cpp
Line 451 in a2d130a
| memcpy(newa, from->ppOutBBs, from->outCount * sizeof(InterpBasicBlock*)); |
In another place cFields is 0 and bmtMFDescs->ppFieldDescList is -1
runtime/src/coreclr/vm/methodtablebuilder.cpp
Lines 3680 to 3681 in a2d130a
| bmtMFDescs->ppFieldDescList = new (GetStackingAllocator()) FieldDesc*[bmtMetaData->cFields]; | |
| ZeroMemory(bmtMFDescs->ppFieldDescList, bmtMetaData->cFields * sizeof(FieldDesc *)); |
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-VM-coreclros-browserBrowser variant of arch-wasmBrowser variant of arch-wasm
Type
Projects
Status
No status