I'm initializing a void pointer with 1 byte of memory and typecasting it to a int pointer and dereferencing it giving it a value 3(which needs 4 bytes) but it is running fine. Shouldn't this result in an error or cause a runtime exception like OOM?
void* record = malloc(1);
int i=3;
*((int*)record) = 3;