Implement memory access bound check with hardware trap for 64-bit platforms (#293)

Also implement native stack overflow check with hardware trap for 64-bit platforms
Refine classic interpreter and fast interpreter to improve performance
Update document
This commit is contained in:
wenyongh
2020-06-28 15:41:25 +08:00
committed by GitHub
parent 548926ab1a
commit ee315e4049
33 changed files with 1143 additions and 438 deletions

View File

@ -42,19 +42,21 @@ os_free(void *ptr)
}
void *
os_mmap(void *hint, unsigned int size, int prot, int flags)
os_mmap(void *hint, size_t size, int prot, int flags)
{
return BH_MALLOC(size);
if ((uint64)size >= UINT32_MAX)
return NULL;
return BH_MALLOC((uint32)size);
}
void
os_munmap(void *addr, uint32 size)
os_munmap(void *addr, size_t size)
{
return BH_FREE(addr);
}
int
os_mprotect(void *addr, uint32 size, int prot)
os_mprotect(void *addr, size_t size, int prot)
{
return 0;
}